Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e18a09e1da | ||
|
|
f3262a0497 | ||
|
|
690f7e636a | ||
|
|
5b95f18889 | ||
|
|
45dd205270 | ||
|
|
0764b0b625 | ||
|
|
8befcb8abf | ||
|
|
89aed8a458 | ||
|
|
ae861e78d2 | ||
|
|
77eb9943d0 | ||
|
|
a0ec72f6c0 | ||
|
|
21a1d57cab | ||
|
|
2833cd0487 | ||
|
|
865bfa2752 | ||
|
|
70ed8f0a61 | ||
|
|
ed42a41bcd | ||
|
|
6a3f931431 | ||
|
|
ef1bc92e67 | ||
|
|
343f171d6a | ||
|
|
61f0945db2 | ||
|
|
29724f5baf | ||
|
|
009fa51155 | ||
|
|
7b405ed78e | ||
|
|
79756d878d |
No files matched your search
@@ -414,21 +414,3 @@ FodyWeavers.xsd
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
|
||||
|
||||
# ---> AutoBidder / Mimante
|
||||
|
||||
# Configurazione di rilascio: contiene un token di Gitea
|
||||
gitea.json
|
||||
|
||||
# Riepilogo della rigiocata sui dossier (target Backtest)
|
||||
*backtest-report.txt
|
||||
|
||||
# Pacchetti prodotti da build/Release.proj
|
||||
bin/installer/
|
||||
|
||||
# Rider / JetBrains
|
||||
.idea/
|
||||
|
||||
# Windows
|
||||
Thumbs.db
|
||||
Desktop.ini
|
||||
@@ -1,17 +1,87 @@
|
||||
# Ciò che non serve nel contesto di build dell'immagine.
|
||||
**Dockerignore file**
|
||||
|
||||
# Build artifacts
|
||||
**/bin/
|
||||
**/obj/
|
||||
**/out/
|
||||
**/publish/
|
||||
|
||||
# User-specific files
|
||||
*.user
|
||||
*.suo
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# IDE files
|
||||
.vs/
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# NuGet packages
|
||||
*.nupkg
|
||||
*.snupkg
|
||||
**/packages/*
|
||||
!**/packages/build/
|
||||
|
||||
# Test results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# Data and databases (exclude from image)
|
||||
**/data/*.db
|
||||
**/data/*.db-shm
|
||||
**/data/*.db-wal
|
||||
**/data/backups/
|
||||
**/data/logs/
|
||||
|
||||
# Git files
|
||||
.git
|
||||
.gitignore
|
||||
.gitattributes
|
||||
.vscode
|
||||
.claude
|
||||
.gitea
|
||||
**/bin
|
||||
**/obj
|
||||
**/TestResults
|
||||
out
|
||||
legacy
|
||||
docs
|
||||
tools
|
||||
unraid
|
||||
.github/
|
||||
|
||||
# CI/CD files
|
||||
.gitea/
|
||||
|
||||
# Documentation
|
||||
*.md
|
||||
Modifiche.txt
|
||||
!README.md
|
||||
|
||||
# Docker files
|
||||
Dockerfile*
|
||||
docker-compose*
|
||||
.dockerignore
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
.env.*
|
||||
|
||||
# Temporary files
|
||||
*.tmp
|
||||
*.temp
|
||||
*.cache
|
||||
*.bak
|
||||
*.log
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@@ -0,0 +1,92 @@
|
||||
# AutoBidder Environment Variables
|
||||
# Copia questo file in .env e configura i valori
|
||||
|
||||
# === ASP.NET Core Configuration ===
|
||||
ASPNETCORE_ENVIRONMENT=Production
|
||||
ASPNETCORE_URLS=http://+:8080
|
||||
|
||||
# === AUTENTICAZIONE APPLICAZIONE (SICUREZZA) ===
|
||||
# Username amministratore
|
||||
ADMIN_USERNAME=admin
|
||||
|
||||
# Password amministratore (OBBLIGATORIO in produzione!)
|
||||
# REQUISITI: min 12 caratteri, maiuscole, minuscole, numeri, simboli
|
||||
# Esempio: Admin@SecurePass2024!
|
||||
ADMIN_PASSWORD=
|
||||
|
||||
# === NOTA: SESSIONE BIDOO ===
|
||||
# Non servono credenziali Bidoo!
|
||||
# Il cookie di sessione Bidoo viene configurato manualmente
|
||||
# dall'interfaccia web in Settings ? Sessione Bidoo
|
||||
|
||||
# === PostgreSQL Database (Statistiche) ===
|
||||
# Username PostgreSQL
|
||||
POSTGRES_USER=autobidder
|
||||
|
||||
# Password PostgreSQL (CAMBIA IN PRODUZIONE!)
|
||||
POSTGRES_PASSWORD=autobidder_password
|
||||
|
||||
# Database name
|
||||
POSTGRES_DB=autobidder_stats
|
||||
|
||||
# Usa PostgreSQL per statistiche (true/false)
|
||||
USE_POSTGRES=true
|
||||
|
||||
# === Application Settings ===
|
||||
# Logging level (Debug, Information, Warning, Error)
|
||||
LOG_LEVEL=Information
|
||||
|
||||
# Porta applicazione (default: 8080 container, mappata su host)
|
||||
APP_PORT=5000
|
||||
|
||||
# === Database Configuration ===
|
||||
# Path database SQLite locale (default: /app/data/autobidder.db in container)
|
||||
# DATABASE_PATH=/app/data/autobidder.db
|
||||
|
||||
# Giorni di retention backup database (default: 30)
|
||||
DB_BACKUP_RETENTION_DAYS=30
|
||||
|
||||
# Auto-ottimizzazione database (VACUUM automatico)
|
||||
DB_AUTO_OPTIMIZE=true
|
||||
|
||||
# === Logging ===
|
||||
# Livello log: Trace, Debug, Information, Warning, Error, Critical
|
||||
LOG_LEVEL=Information
|
||||
|
||||
# Livello log Microsoft: Trace, Debug, Information, Warning, Error, Critical
|
||||
LOG_LEVEL_MICROSOFT=Warning
|
||||
|
||||
# Livello log Entity Framework: Trace, Debug, Information, Warning, Error, Critical
|
||||
LOG_LEVEL_EF=Warning
|
||||
|
||||
# === Application Settings ===
|
||||
# Numero massimo connessioni concorrenti HTTP
|
||||
# MAX_HTTP_CONNECTIONS=10
|
||||
|
||||
# Timeout richieste HTTP (secondi)
|
||||
# HTTP_TIMEOUT=30
|
||||
|
||||
# === Backup Configuration ===
|
||||
# Directory backup (default: /app/data/backups)
|
||||
# BACKUP_DIR=/app/data/backups
|
||||
|
||||
# Numero giorni backup da mantenere
|
||||
# BACKUP_RETENTION_DAYS=30
|
||||
|
||||
# === Security ===
|
||||
# Chiave segreta per DataProtection (genera random se non specificato)
|
||||
# DATA_PROTECTION_KEY=your-random-key-here
|
||||
|
||||
# === Monitoring ===
|
||||
# Abilita metriche Prometheus (true/false)
|
||||
# ENABLE_METRICS=false
|
||||
|
||||
# Porta metriche (se ENABLE_METRICS=true)
|
||||
# METRICS_PORT=9090
|
||||
|
||||
# === Advanced ===
|
||||
# Numero thread worker per polling aste
|
||||
# AUCTION_WORKER_THREADS=4
|
||||
|
||||
# Intervallo pulizia cache (minuti)
|
||||
# CACHE_CLEANUP_INTERVAL=60
|
||||
@@ -1,11 +0,0 @@
|
||||
# I file che finiscono nel container o sul runner Linux restano LF anche su Windows:
|
||||
# uno script con CRLF nel shebang non parte ("bad interpreter").
|
||||
*.sh text eol=lf
|
||||
*.sql text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
Dockerfile text eol=lf
|
||||
*.xml text eol=lf
|
||||
|
||||
*.png binary
|
||||
*.ico binary
|
||||
@@ -0,0 +1,71 @@
|
||||
name: Database Backup
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Esegui backup ogni giorno alle 2:00 AM UTC
|
||||
- cron: '0 2 * * *'
|
||||
workflow_dispatch: # Permette trigger manuale
|
||||
|
||||
jobs:
|
||||
backup-database:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Execute remote backup
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: ${{ secrets.DEPLOY_USER }}
|
||||
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
script: |
|
||||
echo "??? Starting database backup..."
|
||||
|
||||
cd /opt/autobidder
|
||||
|
||||
# Directory backup
|
||||
BACKUP_DIR="./data/backups"
|
||||
mkdir -p $BACKUP_DIR
|
||||
|
||||
# Timestamp
|
||||
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||
|
||||
# Backup database
|
||||
if [ -f ./data/autobidder.db ]; then
|
||||
echo "?? Backing up autobidder.db..."
|
||||
cp ./data/autobidder.db $BACKUP_DIR/autobidder_backup_$TIMESTAMP.db
|
||||
|
||||
# Verifica backup
|
||||
if [ -f $BACKUP_DIR/autobidder_backup_$TIMESTAMP.db ]; then
|
||||
SIZE=$(du -h $BACKUP_DIR/autobidder_backup_$TIMESTAMP.db | cut -f1)
|
||||
echo "? Backup created successfully: $SIZE"
|
||||
else
|
||||
echo "? Backup failed!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "?? Database file not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Cleanup backup vecchi (mantieni ultimi 30 giorni)
|
||||
echo "?? Cleaning up old backups..."
|
||||
find $BACKUP_DIR -name "autobidder_backup_*.db" -mtime +30 -delete
|
||||
|
||||
# Conta backup rimanenti
|
||||
BACKUP_COUNT=$(find $BACKUP_DIR -name "autobidder_backup_*.db" | wc -l)
|
||||
echo "?? Total backups: $BACKUP_COUNT"
|
||||
|
||||
# Mostra dimensione totale backup
|
||||
TOTAL_SIZE=$(du -sh $BACKUP_DIR | cut -f1)
|
||||
echo "?? Total backup size: $TOTAL_SIZE"
|
||||
|
||||
echo "?? Backup completed successfully!"
|
||||
|
||||
- name: Backup summary
|
||||
if: always()
|
||||
run: |
|
||||
if [ "${{ job.status }}" == "success" ]; then
|
||||
echo "? Database backup SUCCESSFUL"
|
||||
else
|
||||
echo "? Database backup FAILED"
|
||||
fi
|
||||
@@ -0,0 +1,222 @@
|
||||
name: Build and Deploy AutoBidder
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- docker
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch: # Permette trigger manuale
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: '8.0.x'
|
||||
REGISTRY: ${{ secrets.GITEA_REGISTRY }}
|
||||
|
||||
jobs:
|
||||
# Job 1: Build e Test .NET
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Fetch completo per analisi
|
||||
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuget-
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test --no-restore --verbosity normal --logger "console;verbosity=detailed"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Publish artifacts
|
||||
run: dotnet publish --configuration Release --no-build --output ./publish
|
||||
|
||||
- name: Upload publish artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: publish-artifacts
|
||||
path: ./publish
|
||||
retention-days: 7
|
||||
|
||||
# Job 2: Build e Push Docker Image
|
||||
build-docker:
|
||||
needs: build-and-test
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.GITEA_USERNAME }}
|
||||
password: ${{ secrets.GITEA_PASSWORD }}
|
||||
|
||||
- name: Extract metadata for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/autobidder
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=sha,prefix=,format=short
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
labels: |
|
||||
org.opencontainers.image.title=AutoBidder
|
||||
org.opencontainers.image.description=Sistema automatizzato gestione aste Blazor
|
||||
org.opencontainers.image.vendor=Alby96
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/autobidder:buildcache
|
||||
cache-to: type=registry,ref=${{ env.REGISTRY }}/autobidder:buildcache,mode=max
|
||||
build-args: |
|
||||
BUILD_DATE=${{ github.event.head_commit.timestamp }}
|
||||
VCS_REF=${{ github.sha }}
|
||||
VERSION=${{ steps.meta.outputs.version }}
|
||||
|
||||
# Job 3: Security Scan (opzionale)
|
||||
security-scan:
|
||||
needs: build-docker
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: ${{ env.REGISTRY }}/autobidder:latest
|
||||
format: 'sarif'
|
||||
output: 'trivy-results.sarif'
|
||||
|
||||
- name: Upload Trivy results
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
|
||||
# Job 4: Deploy su Server
|
||||
deploy:
|
||||
needs: build-docker
|
||||
runs-on: ubuntu-latest
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docker') && github.event_name == 'push'
|
||||
environment:
|
||||
name: production
|
||||
url: https://${{ secrets.DEPLOY_HOST }}:5001
|
||||
|
||||
steps:
|
||||
- name: Deploy to server
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: ${{ secrets.DEPLOY_USER }}
|
||||
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
script: |
|
||||
echo "?? Starting deployment..."
|
||||
|
||||
# Vai alla directory deploy
|
||||
cd /opt/autobidder || exit 1
|
||||
|
||||
# Carica variabili ambiente
|
||||
if [ -f .env ]; then
|
||||
export $(cat .env | grep -v '^#' | xargs)
|
||||
fi
|
||||
|
||||
# Login al registry
|
||||
echo "$GITEA_PASSWORD" | docker login $GITEA_REGISTRY -u $GITEA_USERNAME --password-stdin
|
||||
|
||||
# Backup database prima del deploy
|
||||
echo "?? Creating database backup..."
|
||||
if [ -f data/autobidder.db ]; then
|
||||
mkdir -p data/backups
|
||||
cp data/autobidder.db data/backups/autobidder_predeploy_$(date +%Y%m%d_%H%M%S).db
|
||||
fi
|
||||
|
||||
# Pull nuova immagine
|
||||
echo "?? Pulling latest image..."
|
||||
docker-compose pull
|
||||
|
||||
# Stop vecchi container
|
||||
echo "?? Stopping old containers..."
|
||||
docker-compose down
|
||||
|
||||
# Start nuovi container
|
||||
echo "?? Starting new containers..."
|
||||
docker-compose up -d
|
||||
|
||||
# Attendi healthcheck
|
||||
echo "?? Waiting for healthcheck..."
|
||||
sleep 15
|
||||
|
||||
# Verifica status
|
||||
echo "?? Container status:"
|
||||
docker-compose ps
|
||||
|
||||
# Verifica healthcheck
|
||||
if docker inspect --format='{{.State.Health.Status}}' autobidder | grep -q "healthy"; then
|
||||
echo "? Deploy successful! Container is healthy."
|
||||
else
|
||||
echo "?? Warning: Container may not be healthy yet. Check logs."
|
||||
fi
|
||||
|
||||
# Mostra ultimi log
|
||||
echo "?? Recent logs:"
|
||||
docker-compose logs --tail=30
|
||||
|
||||
echo "?? Deployment completed!"
|
||||
|
||||
- name: Notify deployment status
|
||||
if: always()
|
||||
run: |
|
||||
if [ "${{ job.status }}" == "success" ]; then
|
||||
echo "? Deployment SUCCESSFUL"
|
||||
else
|
||||
echo "? Deployment FAILED"
|
||||
fi
|
||||
|
||||
# Job 5: Cleanup (rimuove vecchie immagini dal registry)
|
||||
cleanup:
|
||||
needs: deploy
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- name: Cleanup old images
|
||||
run: |
|
||||
echo "?? Cleanup task completed (manual cleanup required on Gitea)"
|
||||
@@ -0,0 +1,70 @@
|
||||
name: Health Check Monitor
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Verifica ogni ora
|
||||
- cron: '0 * * * *'
|
||||
workflow_dispatch: # Permette trigger manuale
|
||||
|
||||
jobs:
|
||||
health-check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check application health
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: ${{ secrets.DEPLOY_USER }}
|
||||
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
script: |
|
||||
echo "?? Health Check Starting..."
|
||||
|
||||
# Verifica container running
|
||||
if ! docker ps | grep -q "autobidder"; then
|
||||
echo "? Container NOT running!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verifica Docker healthcheck
|
||||
HEALTH_STATUS=$(docker inspect --format='{{.State.Health.Status}}' autobidder 2>/dev/null || echo "unknown")
|
||||
echo "Docker Health: $HEALTH_STATUS"
|
||||
|
||||
if [ "$HEALTH_STATUS" != "healthy" ]; then
|
||||
echo "?? Container not healthy!"
|
||||
echo "Recent logs:"
|
||||
docker logs autobidder --tail=50
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Test HTTP endpoint
|
||||
if curl -f -s http://localhost:5000/health > /dev/null; then
|
||||
echo "? HTTP endpoint: OK"
|
||||
else
|
||||
echo "? HTTP endpoint: FAILED"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verifica database
|
||||
cd /opt/autobidder
|
||||
if [ -f ./data/autobidder.db ]; then
|
||||
DB_SIZE=$(du -h ./data/autobidder.db | cut -f1)
|
||||
echo "?? Database size: $DB_SIZE"
|
||||
else
|
||||
echo "?? Database file not found!"
|
||||
fi
|
||||
|
||||
# Verifica risorse container
|
||||
echo "?? Container resources:"
|
||||
docker stats autobidder --no-stream --format " CPU: {{.CPUPerc}}\n Memory: {{.MemUsage}}"
|
||||
|
||||
echo "? All health checks passed!"
|
||||
|
||||
- name: Health check summary
|
||||
if: always()
|
||||
run: |
|
||||
if [ "${{ job.status }}" == "success" ]; then
|
||||
echo "? Health check PASSED"
|
||||
else
|
||||
echo "? Health check FAILED - Check server status!"
|
||||
fi
|
||||
@@ -1,55 +0,0 @@
|
||||
# Rilascio a ogni tag vX.Y.Z: controlla che il tag coincida con <Version> di
|
||||
# Directory.Build.props, costruisce e pubblica l'immagine sul registry del Gitea
|
||||
# (192.168.30.23:3000/alby96/bidoo-bidbot:X.Y.Z e :latest), poi crea la release con la
|
||||
# sezione del CHANGELOG e il template Unraid allegato.
|
||||
#
|
||||
# Segreti del repository: REGISTRY_USER e REGISTRY_TOKEN (token con package: read and
|
||||
# write e repository: read and write). Il registry è in HTTP: il demone Docker del runner
|
||||
# (quello di Unraid, se il runner monta il suo socket) deve averlo fra gli insecure-registries.
|
||||
name: Rilascio
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
|
||||
jobs:
|
||||
immagine:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Versione coerente con il tag
|
||||
run: |
|
||||
V=$(sed -n 's/.*<Version>\(.*\)<\/Version>.*/\1/p' Directory.Build.props)
|
||||
[ "v$V" = "${GITHUB_REF_NAME}" ] || { echo "tag ${GITHUB_REF_NAME} diverso da <Version> $V"; exit 1; }
|
||||
echo "VERSION=$V" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Login al registry
|
||||
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login 192.168.30.23:3000 -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||
|
||||
- name: Costruzione e pubblicazione dell'immagine
|
||||
run: |
|
||||
IMG=192.168.30.23:3000/alby96/bidoo-bidbot
|
||||
docker build -f docker/Dockerfile \
|
||||
--build-arg VERSION=$VERSION \
|
||||
--build-arg GIT_COMMIT="${GITHUB_SHA::12}" \
|
||||
-t $IMG:$VERSION -t $IMG:latest .
|
||||
docker push $IMG:$VERSION
|
||||
docker push $IMG:latest
|
||||
|
||||
- name: Release su Gitea con il template Unraid
|
||||
env:
|
||||
TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
|
||||
run: |
|
||||
set -eu
|
||||
NOTE=$(awk -v v="$VERSION" '/^## /{p=($2==v)} p' CHANGELOG.md)
|
||||
[ -n "$NOTE" ] || NOTE="Versione $VERSION"
|
||||
ID=$(curl -sf -H "Authorization: token $TOKEN" "$API/releases/tags/${GITHUB_REF_NAME}" | jq -r '.id // empty' || true)
|
||||
if [ -z "$ID" ]; then
|
||||
ID=$(curl -sf -X POST "$API/releases" \
|
||||
-H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg t "$GITHUB_REF_NAME" --arg n "$NOTE" '{tag_name:$t, name:("Bidoo BidBot " + $t), body:$n}')" | jq -r .id)
|
||||
fi
|
||||
curl -sf -X POST "$API/releases/$ID/assets?name=bidoo-bidbot.xml" \
|
||||
-H "Authorization: token $TOKEN" -F attachment=@unraid/bidoo-bidbot.xml > /dev/null
|
||||
@@ -1,54 +0,0 @@
|
||||
# Verifica a ogni push su main e a ogni pull request: compilazione con gli avvisi come
|
||||
# errori e tutti i test, compresi quelli su PostgreSQL 18 (servizio del job).
|
||||
#
|
||||
# Serve un runner Linux con Docker e l'etichetta ubuntu-latest: se non c'è, il README
|
||||
# (sezione «Sviluppo») spiega come registrarne uno su Unraid con gitea/act_runner.
|
||||
name: Verifica
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:18
|
||||
env:
|
||||
POSTGRES_PASSWORD: test
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_DB: bidbot_test
|
||||
ports: ["5432:5432"]
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U admin -d bidbot_test"
|
||||
--health-interval 5s
|
||||
--health-retries 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '10.0.x'
|
||||
|
||||
- name: Compila
|
||||
run: dotnet build BidooBidBot.sln -c Release --nologo
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
TEST_DB_HOST: postgres
|
||||
TEST_DB_USER: admin
|
||||
TEST_DB_PASSWORD: test
|
||||
TEST_DB_NAME: bidbot_test
|
||||
run: >-
|
||||
dotnet test tests/BidooBidBot.Tests -c Release --no-build --nologo
|
||||
--logger "trx;LogFileName=risultati.trx" --results-directory out/test
|
||||
|
||||
- name: Risultati
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: risultati-test
|
||||
path: out/test/*.trx
|
||||
if-no-files-found: ignore
|
||||
@@ -0,0 +1,97 @@
|
||||
name: AutoBidder CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, docker ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
env:
|
||||
REGISTRY: 192.168.30.23/Alby96
|
||||
IMAGE_NAME: autobidder
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore
|
||||
|
||||
- name: Test
|
||||
run: dotnet test --no-restore --verbosity normal
|
||||
continue-on-error: true
|
||||
|
||||
- name: Publish
|
||||
run: dotnet publish --configuration Release --no-build --output ./publish
|
||||
|
||||
docker-build-push:
|
||||
needs: build-and-test
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ secrets.GITEA_REGISTRY }}
|
||||
username: ${{ secrets.GITEA_USERNAME }}
|
||||
password: ${{ secrets.GITEA_PASSWORD }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=sha
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||
|
||||
deploy:
|
||||
needs: docker-build-push
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/docker' || github.ref == 'refs/heads/main'
|
||||
|
||||
steps:
|
||||
- name: Deploy to server
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: ${{ secrets.DEPLOY_USER }}
|
||||
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
script: |
|
||||
cd /opt/autobidder
|
||||
source .env
|
||||
echo "$GITEA_PASSWORD" | docker login $GITEA_REGISTRY -u $GITEA_USERNAME --password-stdin
|
||||
docker-compose pull
|
||||
docker-compose down
|
||||
docker-compose up -d
|
||||
sleep 10
|
||||
docker-compose ps
|
||||
docker-compose logs --tail=30
|
||||
@@ -1,7 +1,456 @@
|
||||
# Bidoo BidBot: dati delle prove locali e risultati
|
||||
tools/dev/config/
|
||||
tools/dev/config-simulatore/
|
||||
tools/dev/config-release/
|
||||
tools/dev/release.env
|
||||
out/
|
||||
*.trx
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||
*.vbp
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
*.ncb
|
||||
*.aps
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
.idea/
|
||||
|
||||
# ============================================
|
||||
# AutoBidder Specific
|
||||
# ============================================
|
||||
|
||||
# Database files (local development)
|
||||
*.db
|
||||
*.db-shm
|
||||
*.db-wal
|
||||
data/*.db
|
||||
data/*.db-*
|
||||
|
||||
# Backups (keep structure, ignore files)
|
||||
data/backups/*.db
|
||||
data/backups/*.json
|
||||
|
||||
# Logs
|
||||
logs/*.log
|
||||
logs/*.txt
|
||||
*.log
|
||||
|
||||
# Environment files with secrets
|
||||
.env
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Certificates and keys
|
||||
*.pfx
|
||||
*.key
|
||||
*.crt
|
||||
*.pem
|
||||
cert/*
|
||||
!cert/.gitkeep
|
||||
|
||||
# Docker volumes data
|
||||
test-data/
|
||||
|
||||
# Published artifacts
|
||||
publish/
|
||||
PublishProfiles/
|
||||
|
||||
# Temp directories
|
||||
temp/
|
||||
tmp/
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# Keep important empty directories
|
||||
!data/.gitkeep
|
||||
!data/backups/.gitkeep
|
||||
!logs/.gitkeep
|
||||
!cert/.gitkeep
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Bidoo BidBot (locale, PostgreSQL di sviluppo)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
"program": "${workspaceFolder}/src/BidooBidBot/bin/Debug/net10.0/BidooBidBot.dll",
|
||||
"args": ["--config", "${workspaceFolder}/tools/dev/config"],
|
||||
"cwd": "${workspaceFolder}/src/BidooBidBot",
|
||||
"env": { "DB_HOST": "localhost", "DB_PASSWORD": "dev", "UI_PASSWORD": "dev" },
|
||||
"console": "internalConsole",
|
||||
"stopAtEntry": false
|
||||
},
|
||||
{
|
||||
// Compilato in Release, contro il PostgreSQL di Unraid, con la sua cartella dati e la
|
||||
// porta 8090 (convive con quello di sviluppo). Le variabili, password comprese, stanno
|
||||
// in tools/dev/release.env, ignorato da git: si crea copiando release.env.example.
|
||||
// Meglio Ctrl+F5 (senza debugger); con F5 i breakpoint non scattano sul codice ottimizzato.
|
||||
"name": "Bidoo BidBot (release, PostgreSQL di Unraid)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build release",
|
||||
"program": "${workspaceFolder}/src/BidooBidBot/bin/Release/net10.0/BidooBidBot.dll",
|
||||
"args": ["--config", "${workspaceFolder}/tools/dev/config-release"],
|
||||
"cwd": "${workspaceFolder}/src/BidooBidBot",
|
||||
"envFile": "${workspaceFolder}/tools/dev/release.env",
|
||||
"console": "internalConsole",
|
||||
"stopAtEntry": false,
|
||||
// 127.0.0.1 e non localhost: il cookie dell'interfaccia non si mescola con quello del bot
|
||||
// di sviluppo, che sta su localhost:8080.
|
||||
"serverReadyAction": {
|
||||
"action": "openExternally",
|
||||
"pattern": "Interfaccia in ascolto su http://0\\.0\\.0\\.0:(\\d+)",
|
||||
"uriFormat": "http://127.0.0.1:%s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Collegati al bot già avviato",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processName": "BidooBidBot.exe"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
{
|
||||
// Bidoo BidBot: compilazione, test, PostgreSQL di sviluppo, bot in locale, schermate.
|
||||
// I valori «dev» sono solo quelli del compose di sviluppo (tools/dev/docker-compose.yml).
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"detail": "Compila soluzione, servizio, test e strumento delle schermate.",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": ["build", "${workspaceFolder}/BidooBidBot.sln", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary"],
|
||||
"group": { "kind": "build", "isDefault": true },
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "build release",
|
||||
"detail": "Compila il servizio in Release (codice ottimizzato) per l'ambiente di release.",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": ["build", "${workspaceFolder}/src/BidooBidBot/BidooBidBot.csproj", "-c", "Release", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary"],
|
||||
"group": "build",
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "postgres",
|
||||
"detail": "Avvia PostgreSQL 18 di sviluppo (utente admin, password dev, porta 5432).",
|
||||
"type": "process",
|
||||
"command": "docker",
|
||||
"args": ["compose", "-f", "${workspaceFolder}/tools/dev/docker-compose.yml", "up", "-d", "postgres"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "verifica",
|
||||
"detail": "Compila e lancia tutti i test, compresi quelli su PostgreSQL (serve il task «postgres»).",
|
||||
"type": "process",
|
||||
"command": "dotnet",
|
||||
"args": ["test", "${workspaceFolder}/tests/BidooBidBot.Tests", "--nologo"],
|
||||
"options": { "env": { "TEST_DB_HOST": "localhost", "TEST_DB_PASSWORD": "dev" } },
|
||||
"group": { "kind": "test", "isDefault": true },
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "bot in locale",
|
||||
"detail": "Il bot contro il PostgreSQL di sviluppo, interfaccia su http://localhost:8080 (password dev).",
|
||||
"type": "process",
|
||||
"command": "dotnet",
|
||||
"args": ["run", "--project", "${workspaceFolder}/src/BidooBidBot", "--", "--config", "${workspaceFolder}/tools/dev/config"],
|
||||
"options": { "env": { "DB_HOST": "localhost", "DB_PASSWORD": "dev", "UI_PASSWORD": "dev" } },
|
||||
"isBackground": true,
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "schermate",
|
||||
"detail": "Schermate del README dal bot in locale; fallisce se l'interfaccia ha errori JavaScript.",
|
||||
"type": "process",
|
||||
"command": "dotnet",
|
||||
"args": ["run", "--project", "${workspaceFolder}/tools/Screenshots", "--", "http://localhost:8080", "dev", "${workspaceFolder}/docs/screenshot"],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "immagine",
|
||||
"detail": "Costruisce l'immagine Docker bidoo-bidbot:dev (i test girano dentro la build).",
|
||||
"type": "process",
|
||||
"command": "docker",
|
||||
"args": ["build", "-f", "${workspaceFolder}/docker/Dockerfile", "--build-arg", "VERSION=1.0.0", "-t", "bidoo-bidbot:dev", "${workspaceFolder}"],
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<CascadingAuthenticationState>
|
||||
<Router AppAssembly="@typeof(App).Assembly">
|
||||
<Found Context="routeData">
|
||||
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
|
||||
<NotAuthorized>
|
||||
@if (context.User.Identity?.IsAuthenticated != true)
|
||||
{
|
||||
<RedirectToLogin />
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>Non sei autorizzato ad accedere a questa risorsa.</p>
|
||||
}
|
||||
</NotAuthorized>
|
||||
</AuthorizeRouteView>
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>Non trovato</PageTitle>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<div style="padding: 2rem; text-align: center;">
|
||||
<svg style="width: 64px; height: 64px; margin-bottom: 1rem; opacity: 0.5;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="10"></circle>
|
||||
<line x1="12" y1="8" x2="12" y2="12"></line>
|
||||
<line x1="12" y1="16" x2="12.01" y2="16"></line>
|
||||
</svg>
|
||||
<h1 style="font-size: 1.5rem; margin-bottom: 0.5rem;">Pagina non trovata</h1>
|
||||
<p style="color: var(--text-muted);">Spiacenti, non c'è nulla a questo indirizzo.</p>
|
||||
<a href="/" style="color: var(--primary-color); text-decoration: none; margin-top: 1rem; display: inline-block;">
|
||||
?? Torna alla Home
|
||||
</a>
|
||||
</div>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
</CascadingAuthenticationState>
|
||||
@@ -0,0 +1,29 @@
|
||||
<Application x:Class="Mimante.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Mimante"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<!-- Stile pulsanti globale -->
|
||||
<Style x:Key="SmallButtonStyle" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="12"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Windows;
|
||||
|
||||
namespace Mimante
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<AssemblyName>AutoBidder</AssemblyName>
|
||||
<RootNamespace>AutoBidder</RootNamespace>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<DockerfileContext>.</DockerfileContext>
|
||||
<DockerfileFile>Dockerfile</DockerfileFile>
|
||||
|
||||
<!-- Versioning per Docker & Gitea Registry -->
|
||||
<!-- v1.3.0: Database management + bug fixes (duplicates, race conditions, warnings) -->
|
||||
<Version>1.3.0</Version>
|
||||
<AssemblyVersion>1.3.0.0</AssemblyVersion>
|
||||
<FileVersion>1.3.0.0</FileVersion>
|
||||
<InformationalVersion>1.3.0</InformationalVersion>
|
||||
|
||||
<!-- Metadata immagine Docker -->
|
||||
<ContainerImageName>autobidder</ContainerImageName>
|
||||
<ContainerImageTag>$(Version)</ContainerImageTag>
|
||||
<!-- CORRETTO: Convenzione Gitea {registro}/{proprietario}/{immagine} -->
|
||||
<ContainerRegistry>gitea.encke-hake.ts.net/alby96</ContainerRegistry>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Exclude WPF files from compilation -->
|
||||
<Compile Remove=".github\**" />
|
||||
<Compile Remove=".vscode\**" />
|
||||
<Compile Remove="obj\**" />
|
||||
<Compile Remove="Controls\**" />
|
||||
<Compile Remove="Dialogs\**" />
|
||||
<Compile Remove="Core\**" />
|
||||
<Compile Remove="MainWindow.xaml.cs" />
|
||||
<Compile Remove="App.xaml.cs" />
|
||||
<Compile Remove="AssemblyInfo.cs" />
|
||||
<Compile Remove="ViewModels\**" />
|
||||
<Compile Remove="Utilities\NumericTextBoxHelper.cs" />
|
||||
<Compile Remove="Utilities\BooleanToOpacityConverter.cs" />
|
||||
<Compile Remove="Utilities\RelayCommand.cs" />
|
||||
|
||||
<Content Remove=".github\**" />
|
||||
<Content Remove=".vscode\**" />
|
||||
<Content Remove="obj\**" />
|
||||
<Content Remove="Controls\**" />
|
||||
<Content Remove="Dialogs\**" />
|
||||
<Content Remove="**\*.xaml" />
|
||||
|
||||
<EmbeddedResource Remove=".github\**" />
|
||||
<EmbeddedResource Remove=".vscode\**" />
|
||||
<EmbeddedResource Remove="obj\**" />
|
||||
<EmbeddedResource Remove="Controls\**" />
|
||||
<EmbeddedResource Remove="Dialogs\**" />
|
||||
|
||||
<None Remove=".github\**" />
|
||||
<None Remove=".vscode\**" />
|
||||
<None Remove="obj\**" />
|
||||
<None Remove="Controls\**" />
|
||||
<None Remove="Dialogs\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Icon\favicon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Icon\favicon.ico">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include=".gitea\workflows\backup.yml" />
|
||||
<None Include=".gitea\workflows\deploy.yml" />
|
||||
<None Include=".gitea\workflows\health-check.yml" />
|
||||
<None Include=".github\workflows\ci-cd.yml" />
|
||||
<None Include="Dockerfile" />
|
||||
<None Include=".dockerignore" />
|
||||
<None Include="Properties\PublishProfiles\GiteaRegistry-Versioned.pubxml.user" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- ============================================ -->
|
||||
<!-- POST-BUILD TARGET: Push automatico su Gitea -->
|
||||
<!-- con versionamento da <Version> della solution -->
|
||||
<!-- ============================================ -->
|
||||
<Target Name="PushDockerImageToGitea" AfterTargets="Publish" Condition="'$(PushToGiteaRegistry)' == 'true'">
|
||||
<PropertyGroup>
|
||||
<GiteaRegistry>gitea.encke-hake.ts.net/alby96</GiteaRegistry>
|
||||
<LocalImageName>autobidder</LocalImageName>
|
||||
<GiteaImageLatest>$(GiteaRegistry)/$(LocalImageName):latest</GiteaImageLatest>
|
||||
<GiteaImageVersion>$(GiteaRegistry)/$(LocalImageName):$(Version)</GiteaImageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Importance="high" Text="" />
|
||||
<Message Importance="high" Text="+-------------------------------------------------------------------+" />
|
||||
<Message Importance="high" Text="¦ POST-BUILD: Pubblicazione su Gitea Container Registry ¦" />
|
||||
<Message Importance="high" Text="+-------------------------------------------------------------------+" />
|
||||
<Message Importance="high" Text="" />
|
||||
<Message Importance="high" Text="?? Solution Version: $(Version)" />
|
||||
<Message Importance="high" Text="?? Local Image: $(LocalImageName):latest" />
|
||||
<Message Importance="high" Text="??? Target Tags:" />
|
||||
<Message Importance="high" Text=" • $(GiteaImageLatest)" />
|
||||
<Message Importance="high" Text=" • $(GiteaImageVersion)" />
|
||||
<Message Importance="high" Text="" />
|
||||
<Message Importance="high" Text="-------------------------------------------------------------------" />
|
||||
<Message Importance="high" Text="??? Tagging images..." />
|
||||
<Message Importance="high" Text="-------------------------------------------------------------------" />
|
||||
|
||||
<!-- Tag immagine locale per Gitea (latest) -->
|
||||
<Exec Command="docker tag $(LocalImageName):latest $(GiteaImageLatest)" />
|
||||
<Message Importance="high" Text="? Tagged: $(GiteaImageLatest)" />
|
||||
|
||||
<!-- Tag immagine locale per Gitea (versione solution) -->
|
||||
<Exec Command="docker tag $(LocalImageName):latest $(GiteaImageVersion)" />
|
||||
<Message Importance="high" Text="? Tagged: $(GiteaImageVersion)" />
|
||||
|
||||
<Message Importance="high" Text="" />
|
||||
<Message Importance="high" Text="-------------------------------------------------------------------" />
|
||||
<Message Importance="high" Text="?? Pushing to Gitea Registry..." />
|
||||
<Message Importance="high" Text="-------------------------------------------------------------------" />
|
||||
|
||||
<!-- Push latest -->
|
||||
<Exec Command="docker push $(GiteaImageLatest)" />
|
||||
<Message Importance="high" Text="? Pushed: $(GiteaImageLatest)" />
|
||||
|
||||
<!-- Push version -->
|
||||
<Exec Command="docker push $(GiteaImageVersion)" />
|
||||
<Message Importance="high" Text="? Pushed: $(GiteaImageVersion)" />
|
||||
|
||||
<Message Importance="high" Text="" />
|
||||
<Message Importance="high" Text="+-------------------------------------------------------------------+" />
|
||||
<Message Importance="high" Text="¦ ? PUBBLICAZIONE COMPLETATA CON SUCCESSO! ¦" />
|
||||
<Message Importance="high" Text="+-------------------------------------------------------------------+" />
|
||||
<Message Importance="high" Text="" />
|
||||
<Message Importance="high" Text="?? Visualizza su Gitea:" />
|
||||
<Message Importance="high" Text=" https://gitea.encke-hake.ts.net/Alby96/-/packages/container/autobidder" />
|
||||
<Message Importance="high" Text="" />
|
||||
<Message Importance="high" Text="?? Tag pubblicati:" />
|
||||
<Message Importance="high" Text=" • latest (sempre aggiornato all'ultima versione)" />
|
||||
<Message Importance="high" Text=" • $(Version) (versione solution corrente)" />
|
||||
<Message Importance="high" Text="" />
|
||||
<Message Importance="high" Text="?? Pull command:" />
|
||||
<Message Importance="high" Text=" docker pull $(GiteaImageLatest)" />
|
||||
<Message Importance="high" Text=" docker pull $(GiteaImageVersion)" />
|
||||
<Message Importance="high" Text="" />
|
||||
<Message Importance="high" Text="-------------------------------------------------------------------" />
|
||||
<Message Importance="high" Text="" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -1,55 +1,48 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.0.11217.181 d18.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoBidder", "AutoBidder.csproj", "{9BBAEF93-DF66-432C-9349-459E272D6538}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoBidder.Tests", "Tests\AutoBidder.Tests.csproj", "{CAC096C0-E399-4268-B2FF-E205947CB733}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|x64.Build.0 = Release|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9BBAEF93-DF66-432C-9349-459E272D6538}.Release|x86.Build.0 = Release|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Release|x64.Build.0 = Release|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{CAC096C0-E399-4268-B2FF-E205947CB733} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1C55CA56-D270-4D9A-91DA-410BF131E905}
|
||||
EndGlobalSection
|
||||
@@ -1,73 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BidooBidBot", "src\BidooBidBot\BidooBidBot.csproj", "{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BidooBidBot.Tests", "tests\BidooBidBot.Tests\BidooBidBot.Tests.csproj", "{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{07C2787E-EAC7-C090-1BA3-A61EC2A24D84}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Screenshots", "tools\Screenshots\Screenshots.csproj", "{B736FC31-794D-4690-8213-096952EC40F8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Release|x64.Build.0 = Release|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9}.Release|x86.Build.0 = Release|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Release|x64.Build.0 = Release|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217}.Release|x86.Build.0 = Release|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B736FC31-794D-4690-8213-096952EC40F8}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{5CA3665D-BD05-4811-B099-12CB5BE6D9B9} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
|
||||
{1C5980F7-E3CB-4999-AB1D-4B6F5FAAB217} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
|
||||
{B736FC31-794D-4690-8213-096952EC40F8} = {07C2787E-EAC7-C090-1BA3-A61EC2A24D84}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,39 +0,0 @@
|
||||
# Novità
|
||||
|
||||
Il formato segue le versioni `MAJOR.MINOR.PATCH` di `Directory.Build.props`; il workflow di rilascio
|
||||
copia nella release la sezione della versione.
|
||||
|
||||
## 1.0.0
|
||||
|
||||
Prima versione di **Bidoo BidBot**, la riscrittura di AutoBidder come servizio Docker per Unraid.
|
||||
|
||||
- **Un solo container** con motore, interfaccia web e Chromium; PostgreSQL 18 esterno. Configurazione
|
||||
con tre variabili obbligatorie (`DB_HOST`, `DB_PASSWORD`, `UI_PASSWORD`); schermata d'errore con la
|
||||
causa esatta e nuovo tentativo ogni 30 secondi; `/salute` per il controllo di Unraid.
|
||||
- **Motore di precisione** portato dal legacy: orologio agganciato a quello di Bidoo, un thread dedicato
|
||||
per la finestra critica, attesa di precisione con l'errore misurato, corsia dedicata alle puntate con
|
||||
un solo ripiego sul pool, cadenza del polling per distanza dalla scadenza.
|
||||
- **Il modello è l'unico decisore**: valore atteso con la probabilità appresa (logistica campione, rete
|
||||
sfidante, bandit di Thompson per l'esplorazione, correzione sulle mie puntate, anticipo adattivo). I
|
||||
paletti dell'utente sono tutti a zero di fabbrica.
|
||||
- **OSSERVA di fabbrica**: DAL VIVO si accende con due conferme; HALT persistente con stop-loss,
|
||||
drawdown e tetto di spesa del giorno.
|
||||
- **Allenamento in Osserva e previsione dell'asta**: chiusura attesa con intervallo 10-90, puntate del
|
||||
vincitore, durata, «se entrassi ora»; confronto con la realtà alla chiusura.
|
||||
- **Interfaccia web** senza framework: Aste, Cerca, Prodotti, Storico, Apprendimento, Accesso a Bidoo,
|
||||
Impostazioni, Registro; countdown animati dal browser, aggiornamenti a delta via WebSocket, pannelli
|
||||
ridimensionabili, tema chiaro e scuro, finestra stretta. Nessuna notifica che compare ai lati mentre
|
||||
si lavora: le conferme di routine si vedono nell'interfaccia stessa, e solo errori e informazioni
|
||||
importanti (puntate, sessione, risultati di studio, verifica, manutenzione) aprono un messaggio al
|
||||
centro da chiudere con OK.
|
||||
- **Accesso assistito** a Bidoo con il browser del bot in streaming nell'interfaccia (CDP scritto a
|
||||
mano); sessione cifrata AES-256-GCM; ripiego «incolla i cookie».
|
||||
- **Simulatore interno** con lo stesso formato del sito: primo avvio senza sessione, riscaldamento del
|
||||
motore, test, schermate. Dati e modello del simulatore separati da quelli veri.
|
||||
- **Dati**: storico completo in PostgreSQL con partizioni mensili, nessuna interrogazione registrata,
|
||||
tetto di 50 GB con ordine di sacrificio, backup notturno delle tabelle di riepilogo.
|
||||
- **Esportazioni CSV per la revisione**: dati del modello (una riga per decisione con tutte le
|
||||
variabili) e storico delle aste, con legenda.
|
||||
- **Telegram**: vincite, perdite, sessione scaduta, HALT, spazio, riepilogo periodico; comandi facoltativi.
|
||||
- **Prodotti seguiti** con aggiunta automatica delle aste, limiti consigliati (solo consigli) e recupero
|
||||
delle puntate dei vincitori.
|
||||
@@ -1,86 +0,0 @@
|
||||
# Bidoo BidBot (repo Mimante, futuro `bidoo-bidbot`)
|
||||
|
||||
Servizio Linux in un solo container Docker (Unraid) che segue le aste al centesimo di Bidoo,
|
||||
decide con un modello appreso se puntare, punta negli ultimi millisecondi, registra su
|
||||
PostgreSQL ciò che serve allo storico e al modello, si comanda da un'interfaccia web protetta
|
||||
da password e avvisa su Telegram. C# / .NET 10, interfaccia HTML/CSS/JS senza framework.
|
||||
|
||||
- Specifica completa e decisioni prese: [docs/SPECIFICA.md](docs/SPECIFICA.md) (il documento
|
||||
da cui è nata la riscrittura; le domande aperte sono al §16).
|
||||
- Stato del lavoro, decisioni provvisorie, cosa manca: [docs/STATE.md](docs/STATE.md). Va
|
||||
aggiornato a fine sessione.
|
||||
- Architettura per chi tocca il codice: [docs/ARCHITETTURA.md](docs/ARCHITETTURA.md). Decisioni
|
||||
non ovvie: [docs/adr/](docs/adr/). Guida utente: [README.md](README.md) e
|
||||
[docs/COME-FUNZIONA.md](docs/COME-FUNZIONA.md).
|
||||
- `legacy/` è la vecchia app WPF: sola lettura, contiene conoscenza verificata (protocollo di
|
||||
Bidoo, orologio, modello). Si elimina a fine lavoro (M10), dopo la prova su Unraid.
|
||||
|
||||
## Regole del progetto
|
||||
|
||||
- **Il modello è l'unico decisore.** L'utente ha solo paletti (prezzo massimo, puntate
|
||||
massime, soglia sul saldo, fascia oraria, rischio), tutti a zero = nessun limite. Nessuna
|
||||
euristica di strategia fuori da `Strategy/BidStrategy` e `Ml/LearningService`.
|
||||
- **OSSERVA predefinita.** Le puntate vere partono solo con modalità DAL VIVO (doppia conferma)
|
||||
e asta in Attiva. HALT persistente nel database.
|
||||
- **Solo C#** (più SQL, YAML, JSON, HTML/CSS/JS dell'interfaccia e lo shell dell'immagine).
|
||||
Pacchetti ammessi: `Npgsql`, `xunit`, `Microsoft.NET.Test.Sdk`. Tutto il resto si scrive.
|
||||
- **Lingua:** interfaccia, documentazione, registri, messaggi e commenti in italiano;
|
||||
identificatori, file di codice, chiavi JSON e tabelle in inglese.
|
||||
- **Registri:** una riga per evento, niente emoji né simboli (tutto passa da `LogText.Clean`),
|
||||
niente righe ripetute per la stessa decisione (`AuctionLog.AddDecision`). Le singole
|
||||
interrogazioni a Bidoo non si registrano mai.
|
||||
- **Percorso caldo** (risposta di `data.php` → invio di `bid.php`): niente disco, niente
|
||||
database, niente lock lunghi. Tutto ciò che va su PostgreSQL passa da `Data/WriteQueue`.
|
||||
- **Nel database solo storico e modello.** Ogni tabella ha il suo «serve al modello per…» o
|
||||
«serve allo storico per…» in `docs/ARCHITETTURA.md`; registri, diagnostica e stato
|
||||
dell'interfaccia stanno in memoria o su file.
|
||||
- **Migrazioni solo additive:** un file nuovo `src/BidooBidBot/Data/Migrations/NNNN_nome.sql`,
|
||||
mai riscrivere tabelle esistenti. Le tabelle partizionate (`bids`, `resets`, `bot_decisions`)
|
||||
hanno le partizioni mensili create dal programma.
|
||||
- **Variabili del modello:** se cambia una fascia di `Ml/BidFeatures`, alza `Version`;
|
||||
l'archivio si ristudia da solo.
|
||||
- **Nessun parametro cablato:** i valori vivono in `Settings/AppSettings` (nel database) o in
|
||||
`/config/riferimenti/bidoo.json` (endpoint ed espressioni del sito).
|
||||
- **Segreti:** `DB_PASSWORD` e `UI_PASSWORD` solo in ambiente; mai nei registri, nelle
|
||||
esportazioni, in `docs/`. Il token Telegram sta nel database e in `/config/cache` (0600).
|
||||
- **Test accanto a ogni pezzo di logica pura** (`tests/BidooBidBot.Tests`, xUnit). I test su
|
||||
PostgreSQL usano `[Collection("Database")]` e saltano se manca `TEST_DB_HOST`.
|
||||
- **Interfaccia:** ogni numero, campo e intestazione ha un `title` che dice esattamente cos'è;
|
||||
aggiornamento chirurgico del DOM (mai ri-renderizzare la griglia, vedi `wwwroot/js/grid.js`);
|
||||
layout fluido con maniglie; token di colore solo da `wwwroot/css/tokens.css`. **Niente
|
||||
notifiche che compaiono ai lati**: una conferma di routine si vede già nell'interfaccia
|
||||
(stella, bottone del modo, riga); un messaggio al centro (`notice`, `report(ack, { important: true })`
|
||||
in `wwwroot/js/util.js`) solo per errori e informazioni importanti. Dopo ogni
|
||||
modifica all'interfaccia: `tools/Screenshots` contro il bot in locale deve finire con
|
||||
«Nessun errore JavaScript», e le schermate vanno guardate.
|
||||
- **Due mondi separati:** sito vero e simulatore (`Host/BotWorld`). I dati del simulatore hanno
|
||||
`auctions.type = 'sim'` e il modello in `ml-sim/*`; ogni lettura dell'archivio filtra per mondo.
|
||||
Nessun dato del simulatore deve finire nel modello vero.
|
||||
|
||||
## Comandi
|
||||
|
||||
```
|
||||
dotnet build BidooBidBot.sln -c Release
|
||||
dotnet test tests/BidooBidBot.Tests -c Release --no-build
|
||||
|
||||
# PostgreSQL 18 per sviluppo e test del database
|
||||
docker compose -f tools/dev/docker-compose.yml up -d postgres
|
||||
$env:TEST_DB_HOST="localhost"; $env:TEST_DB_PASSWORD="dev" # poi dotnet test
|
||||
|
||||
# Il bot in locale (senza Docker), contro il PostgreSQL del compose
|
||||
$env:DB_HOST="localhost"; $env:DB_PASSWORD="dev"; $env:UI_PASSWORD="dev"
|
||||
dotnet run --project src/BidooBidBot -- --config "$PWD/tools/dev/config" # percorso assoluto
|
||||
|
||||
# Ambiente di release (prove sul sito vero): VS Code «Bidoo BidBot (release, PostgreSQL di Unraid)»,
|
||||
# Ctrl+F5. Release, PostgreSQL di Unraid, tools/dev/config-release, porta 8090; variabili in
|
||||
# tools/dev/release.env (ignorato da git, modello in release.env.example). Non stamparne mai le password.
|
||||
|
||||
# Immagine e screenshot per il README
|
||||
docker build -f docker/Dockerfile --build-arg VERSION=1.0.0 -t bidoo-bidbot:dev .
|
||||
dotnet run --project tools/Screenshots -- http://localhost:8080 dev docs/screenshot # --accesso-assistito prova anche Chromium
|
||||
```
|
||||
|
||||
`--config <cartella>` serve solo allo sviluppo fuori dal container (predefinito `/config`):
|
||||
nessuna variabile d'ambiente oltre a quelle di §10.1 della specifica.
|
||||
Il rilascio è un tag `vX.Y.Z` uguale a `<Version>` in `Directory.Build.props`
|
||||
(`.gitea/workflows/rilascio.yml`). Non stampare mai token o password.
|
||||
@@ -0,0 +1,964 @@
|
||||
<UserControl x:Class="AutoBidder.Controls.AuctionMonitorControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:util="clr-namespace:AutoBidder.Utilities"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="800" d:DesignWidth="1200"
|
||||
Background="#1E1E1E">
|
||||
|
||||
<UserControl.Resources>
|
||||
<!-- Converters -->
|
||||
<util:BooleanToOpacityConverter x:Key="BoolToOpacity"/>
|
||||
|
||||
<!-- Rounded Button Style -->
|
||||
<Style x:Key="RoundedButton" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="8"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Padding" Value="15,10"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- Small Rounded Button -->
|
||||
<Style x:Key="SmallRoundedButton" TargetType="Button" BasedOn="{StaticResource RoundedButton}">
|
||||
<Setter Property="Padding" Value="12,6"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
</Style>
|
||||
|
||||
<!-- Card Style -->
|
||||
<Style x:Key="CardBorder" TargetType="Border">
|
||||
<Setter Property="Background" Value="#252526"/>
|
||||
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header - COMPATTO SU 3 RIGHE -->
|
||||
<Border Grid.Row="0" Background="#2D2D30" Padding="15,8" BorderBrush="#3E3E42" BorderThickness="0,0,0,1">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Riga 1: Solo Puntate -->
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,3">
|
||||
<TextBlock Text="Puntate: "
|
||||
Foreground="#999999"
|
||||
FontSize="13"
|
||||
Margin="0,0,5,0"/>
|
||||
|
||||
<!-- 🎯 StackPanel per includere indicatore limite -->
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock x:Name="RemainingBidsText"
|
||||
Text="0"
|
||||
Foreground="#00D800"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"
|
||||
Margin="0,0,0,0"/>
|
||||
|
||||
<!-- 🎯 Indicatore limite minimo puntate (solo numero tra parentesi) -->
|
||||
<TextBlock x:Name="MinBidsLimitIndicator"
|
||||
Text="(20)"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"
|
||||
ToolTip="Limite minimo puntate attivo"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Riga 2: Solo Credito Shop -->
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,3">
|
||||
<TextBlock Text="Credito Shop: "
|
||||
Foreground="#999999"
|
||||
FontSize="12"
|
||||
Margin="0,0,5,0"/>
|
||||
<TextBlock x:Name="ShopCreditText"
|
||||
Text="EUR 0.00"
|
||||
Foreground="#00D800"
|
||||
FontSize="12"
|
||||
FontWeight="Bold"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Riga 3: Solo Aste vinte -->
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="Aste vinte da confermare: "
|
||||
Foreground="#999999"
|
||||
FontSize="12"
|
||||
Margin="0,0,5,0"/>
|
||||
<TextBlock x:Name="BannerAsteDaRiscattare"
|
||||
Text="0"
|
||||
Foreground="#FFB700"
|
||||
FontSize="12"
|
||||
FontWeight="Bold"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Control Buttons (Right) - Su tutte e 3 le righe -->
|
||||
<StackPanel Grid.Row="0" Grid.RowSpan="3" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||
<Button x:Name="StartButton"
|
||||
Content="Avvia Tutti"
|
||||
Background="#00D800"
|
||||
Style="{StaticResource RoundedButton}"
|
||||
Margin="5,0"
|
||||
Click="StartButton_Click"/>
|
||||
|
||||
<Button x:Name="PauseAllButton"
|
||||
Content="Pausa Tutti"
|
||||
Background="#FFB700"
|
||||
Style="{StaticResource RoundedButton}"
|
||||
Margin="5,0"
|
||||
Click="PauseAllButton_Click"/>
|
||||
|
||||
<Button x:Name="StopButton"
|
||||
Content="Ferma Tutti"
|
||||
Background="#E81123"
|
||||
Style="{StaticResource RoundedButton}"
|
||||
Margin="5,0"
|
||||
Click="StopButton_Click"/>
|
||||
|
||||
<!-- Separator -->
|
||||
<Border Width="1"
|
||||
Background="#3E3E42"
|
||||
Margin="10,5"/>
|
||||
|
||||
<!-- Export Button -->
|
||||
<Button x:Name="ExportButton"
|
||||
Content="Esporta"
|
||||
Background="#007ACC"
|
||||
Style="{StaticResource RoundedButton}"
|
||||
Margin="5,0"
|
||||
Click="ExportButton_Click"
|
||||
ToolTip="Esporta dati aste monitorate"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Main Layout: 2 rows -->
|
||||
<Grid Grid.Row="1" Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- TOP ROW: Auction Grid (2/3) + Global Log (1/3) -->
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- TOP LEFT: Auction Grid -->
|
||||
<Border Grid.Column="0" Style="{StaticResource CardBorder}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Grid Header -->
|
||||
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8" CornerRadius="4,4,0,0">
|
||||
<Grid>
|
||||
<TextBlock x:Name="MonitorateTitle"
|
||||
Text="Aste monitorate: 0"
|
||||
Foreground="#00D800"
|
||||
FontSize="14"
|
||||
FontWeight="Bold"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="Aggiungi"
|
||||
x:Name="AddUrlButton"
|
||||
Background="#007ACC"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="10,5"
|
||||
FontSize="11"
|
||||
Margin="3,0"
|
||||
Click="AddUrlButton_Click"
|
||||
ToolTip="Aggiungi nuova asta"/>
|
||||
|
||||
<!-- NUOVO: Pulsanti per riordinare le aste (senza emoji) -->
|
||||
<Button Content="Sposta Su"
|
||||
x:Name="MoveUpButton"
|
||||
Background="#9B4F96"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="10,5"
|
||||
FontSize="11"
|
||||
Margin="3,0"
|
||||
Click="MoveUpButton_Click"
|
||||
ToolTip="Sposta l'asta selezionata verso l'alto"/>
|
||||
|
||||
<Button Content="Sposta Giù"
|
||||
x:Name="MoveDownButton"
|
||||
Background="#9B4F96"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="10,5"
|
||||
FontSize="11"
|
||||
Margin="3,0"
|
||||
Click="MoveDownButton_Click"
|
||||
ToolTip="Sposta l'asta selezionata verso il basso"/>
|
||||
|
||||
<Button Content="Rimuovi"
|
||||
x:Name="RemoveUrlButton"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="10,5"
|
||||
FontSize="11"
|
||||
Margin="3,0"
|
||||
Click="RemoveUrlButton_Click"
|
||||
ToolTip="Rimuovi asta selezionata"/>
|
||||
|
||||
<Button Content="Rimuovi Tutte"
|
||||
x:Name="RemoveAllButton"
|
||||
Background="#E81123"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="10,5"
|
||||
FontSize="11"
|
||||
Margin="3,0"
|
||||
Click="RemoveAllButton_Click"
|
||||
ToolTip="Rimuovi tutte le aste monitorate"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Auction DataGrid -->
|
||||
<DataGrid Grid.Row="1"
|
||||
x:Name="MultiAuctionsGrid"
|
||||
AutoGenerateColumns="False"
|
||||
SelectionMode="Single"
|
||||
CanUserAddRows="False"
|
||||
IsReadOnly="True"
|
||||
GridLinesVisibility="Horizontal"
|
||||
HeadersVisibility="Column"
|
||||
Background="#1E1E1E"
|
||||
Foreground="#CCCCCC"
|
||||
RowBackground="#1E1E1E"
|
||||
AlternatingRowBackground="#252526"
|
||||
BorderThickness="0"
|
||||
SelectionChanged="MultiAuctionsGrid_SelectionChanged"
|
||||
PreviewKeyDown="MultiAuctionsGrid_PreviewKeyDown"
|
||||
Focusable="True"
|
||||
FocusVisualStyle="{x:Null}">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="Background" Value="#2D2D30"/>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Padding" Value="8,6"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||||
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
||||
<Setter Property="FontSize" Value="11"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="8,4"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="FontSize" Value="11"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#094771"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="ID" Binding="{Binding AuctionId}" Width="90"/>
|
||||
<DataGridTextColumn Header="Asta" Binding="{Binding Name}" Width="2*"/>
|
||||
<DataGridTextColumn Header="Latenza" Binding="{Binding LatencyDisplay}" Width="70"/>
|
||||
<DataGridTextColumn Header="Stato" Binding="{Binding StatusDisplay}" Width="100"/>
|
||||
<DataGridTextColumn Header="Timer" Binding="{Binding TimerDisplay}" Width="90"/>
|
||||
<DataGridTextColumn Header="Prezzo" Binding="{Binding PriceDisplay}" Width="70"/>
|
||||
<DataGridTextColumn Header="Ultimo" Binding="{Binding LastBidder}" Width="110"/>
|
||||
<DataGridTextColumn Header="Clicks" Binding="{Binding MyClicks}" Width="60"/>
|
||||
<DataGridTemplateColumn Header="Azioni" Width="260">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="Avvia"
|
||||
Command="{Binding DataContext.GridStartCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
CommandParameter="{Binding}"
|
||||
IsEnabled="{Binding CanStart}"
|
||||
Opacity="{Binding CanStart, Converter={StaticResource BoolToOpacity}}"
|
||||
Background="#00D800"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="6,3"
|
||||
FontSize="10"
|
||||
Margin="1"/>
|
||||
<Button Content="Pausa"
|
||||
Command="{Binding DataContext.GridPauseCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
CommandParameter="{Binding}"
|
||||
IsEnabled="{Binding CanPause}"
|
||||
Opacity="{Binding CanPause, Converter={StaticResource BoolToOpacity}}"
|
||||
Background="#FFB700"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="6,3"
|
||||
FontSize="10"
|
||||
Margin="1"/>
|
||||
<Button Content="Ferma"
|
||||
Command="{Binding DataContext.GridStopCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
CommandParameter="{Binding}"
|
||||
IsEnabled="{Binding CanStop}"
|
||||
Opacity="{Binding CanStop, Converter={StaticResource BoolToOpacity}}"
|
||||
Background="#E81123"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="6,3"
|
||||
FontSize="10"
|
||||
Margin="1"/>
|
||||
<Button Content="Punta"
|
||||
Command="{Binding DataContext.GridBidCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
CommandParameter="{Binding}"
|
||||
IsEnabled="{Binding CanBid}"
|
||||
Opacity="{Binding CanBid, Converter={StaticResource BoolToOpacity}}"
|
||||
Background="#9B4F96"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="6,3"
|
||||
FontSize="10"
|
||||
Margin="1"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Vertical Splitter -->
|
||||
<GridSplitter Grid.Column="1"
|
||||
Width="5"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#3E3E42"
|
||||
ResizeBehavior="PreviousAndNext"/>
|
||||
|
||||
<!-- TOP RIGHT: Global Log -->
|
||||
<Border Grid.Column="2" Style="{StaticResource CardBorder}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8" CornerRadius="4,4,0,0">
|
||||
<Grid>
|
||||
<TextBlock Text="Log Globale"
|
||||
Foreground="#00D800"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button x:Name="ClearGlobalLogButton"
|
||||
Content="Pulisci"
|
||||
HorizontalAlignment="Right"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="8,4"
|
||||
FontSize="10"
|
||||
Click="ClearGlobalLogButton_Click"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Log Box -->
|
||||
<RichTextBox Grid.Row="1"
|
||||
x:Name="LogBox"
|
||||
IsReadOnly="True"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Background="#1E1E1E"
|
||||
Foreground="#00D800"
|
||||
BorderThickness="0"
|
||||
FontFamily="Consolas"
|
||||
FontSize="10"
|
||||
Padding="8"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- Horizontal Splitter -->
|
||||
<GridSplitter Grid.Row="1"
|
||||
Height="5"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="#3E3E42"
|
||||
ResizeBehavior="PreviousAndNext"/>
|
||||
|
||||
<!-- BOTTOM ROW: Settings (1/3) + Bidders (1/3) + Auction Log (1/3) -->
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- BOTTOM LEFT: Settings (Impostazioni) -->
|
||||
<Border Grid.Column="0" Style="{StaticResource CardBorder}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8" CornerRadius="4,4,0,0">
|
||||
<TextBlock Text="Impostazioni"
|
||||
Foreground="#00D800"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"/>
|
||||
</Border>
|
||||
|
||||
<!-- Settings Content -->
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock x:Name="SelectedAuctionName"
|
||||
Text="Seleziona un'asta"
|
||||
Foreground="White"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"
|
||||
Margin="0,0,0,8"/>
|
||||
|
||||
<TextBox x:Name="SelectedAuctionUrl"
|
||||
IsReadOnly="True"
|
||||
Background="#1E1E1E"
|
||||
Foreground="#999999"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
Padding="6"
|
||||
FontSize="10"
|
||||
Margin="0,0,0,8"
|
||||
TextWrapping="Wrap"
|
||||
MaxHeight="50"/>
|
||||
|
||||
<!-- Pulsanti azione asta - RIORDINATI E FUNZIONANTI -->
|
||||
<Grid Margin="0,0,0,15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Riga 1: Browser -->
|
||||
<Button Grid.Row="0" Grid.Column="0"
|
||||
x:Name="OpenAuctionInternalButton"
|
||||
Content="Browser Interno"
|
||||
Background="#007ACC"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="8,5"
|
||||
FontSize="10"
|
||||
Margin="0,0,2,3"
|
||||
ToolTip="Apri asta nel browser integrato"
|
||||
Click="OpenAuctionInternalButton_Click"/>
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="1"
|
||||
x:Name="OpenAuctionExternalButton"
|
||||
Content="Browser Esterno"
|
||||
Background="#0078D7"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="8,5"
|
||||
FontSize="10"
|
||||
Margin="2,0,0,3"
|
||||
ToolTip="Apri asta nel browser predefinito di sistema"
|
||||
Click="OpenAuctionExternalButton_Click"/>
|
||||
|
||||
<!-- Riga 2: Azioni -->
|
||||
<Button Grid.Row="1" Grid.Column="0"
|
||||
x:Name="CopyAuctionUrlButton"
|
||||
Content="Copia URL"
|
||||
Background="#9B4F96"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="8,5"
|
||||
FontSize="10"
|
||||
Margin="0,0,2,0"
|
||||
ToolTip="Copia URL negli appunti"
|
||||
Click="CopyAuctionUrlButton_Click"/>
|
||||
|
||||
<Button Grid.Row="1" Grid.Column="1"
|
||||
x:Name="ExportAuctionButton"
|
||||
Content="Esporta"
|
||||
Background="#106EBE"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="8,5"
|
||||
FontSize="10"
|
||||
Margin="2,0,0,0"
|
||||
ToolTip="Esporta dati asta"
|
||||
Click="ExportAuctionButton_Click"/>
|
||||
</Grid>
|
||||
|
||||
<!-- NUOVA SEZIONE: Info Prodotto - SEZIONE FISSA -->
|
||||
<Border BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
Background="#2D2D30"
|
||||
Padding="10"
|
||||
CornerRadius="4"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel>
|
||||
<!-- Header fisso -->
|
||||
<TextBlock Text="Informazioni Prodotto"
|
||||
FontWeight="Bold"
|
||||
FontSize="12"
|
||||
Foreground="#CCCCCC"
|
||||
Margin="0,0,0,10"/>
|
||||
|
||||
<!-- Dati Prodotto -->
|
||||
<Grid x:Name="ProductInfoGrid" Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Valore -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="Valore:"
|
||||
FontWeight="Bold"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="11"
|
||||
Margin="0,3"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||
x:Name="ProductBuyNowPriceText"
|
||||
Text="-"
|
||||
Foreground="#007ACC"
|
||||
FontSize="11"
|
||||
FontWeight="Bold"
|
||||
Margin="5,3"/>
|
||||
|
||||
<!-- Extra (Spedizione/Transazione) -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||
Text="Extra:"
|
||||
FontWeight="Bold"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="11"
|
||||
Margin="0,3"
|
||||
ToolTip="Spese di spedizione o transazione"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1"
|
||||
x:Name="ProductShippingCostText"
|
||||
Text="-"
|
||||
Foreground="#FFB700"
|
||||
FontSize="11"
|
||||
Margin="5,3"/>
|
||||
|
||||
<!-- Limite Vincita -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||
Text="Limite:"
|
||||
FontWeight="Bold"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="11"
|
||||
Margin="0,3"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1"
|
||||
x:Name="ProductWinLimitText"
|
||||
Text="-"
|
||||
Foreground="#999999"
|
||||
FontSize="11"
|
||||
TextWrapping="Wrap"
|
||||
Margin="5,3"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Pulsante Applica Limiti -->
|
||||
<Button x:Name="RefreshProductInfoButton"
|
||||
Content="Applica Limiti Suggeriti"
|
||||
Background="#007ACC"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="10,6"
|
||||
FontSize="11"
|
||||
Margin="0,0,0,0"
|
||||
Click="RefreshProductInfoButton_Click"
|
||||
ToolTip="Calcola e applica limiti Max EUR e Max Clicks basati sul valore del prodotto"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Settings Grid - Campi aggiornati -->
|
||||
<Grid Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="15"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Row 1: Anticipo ms -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Anticipo (ms):" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center" ToolTip="Millisecondi prima della scadenza per puntare"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" x:Name="SelectedBidBeforeDeadlineMs" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedBidBeforeDeadlineMs_TextChanged"/>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="3" Text="Min EUR:" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="4" x:Name="SelectedMinPrice" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedMinPrice_TextChanged"/>
|
||||
|
||||
<!-- Row 2 -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Max EUR:" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" x:Name="SelectedMaxPrice" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedMaxPrice_TextChanged"/>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="3" Text="Max Clicks:" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="4" x:Name="SelectedMaxClicks" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedMaxClicks_TextChanged"/>
|
||||
|
||||
<!-- Row 3: Check Auction Open -->
|
||||
<CheckBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="5"
|
||||
x:Name="SelectedCheckAuctionOpen"
|
||||
Content="Verifica stato asta prima di puntare"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="11"
|
||||
Margin="0,10,0,0"
|
||||
Checked="SelectedCheckAuctionOpen_Changed"
|
||||
Unchecked="SelectedCheckAuctionOpen_Changed"
|
||||
ToolTip="Aggiunge una chiamata API extra per verificare che l'asta sia ancora aperta"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- Footer Button (bottom like other panels) -->
|
||||
<Button Grid.Row="2"
|
||||
x:Name="ResetSettingsButton"
|
||||
Content="Reset"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="5"
|
||||
Click="ResetSettingsButton_Click"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Vertical Splitter 1 -->
|
||||
<GridSplitter Grid.Column="1"
|
||||
Width="5"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#3E3E42"
|
||||
ResizeBehavior="PreviousAndNext"/>
|
||||
|
||||
<!-- BOTTOM CENTER: Tab Control (Utenti + Storia Puntate) -->
|
||||
<Border Grid.Column="2" Style="{StaticResource CardBorder}">
|
||||
<TabControl Background="#252526" BorderThickness="0">
|
||||
<TabControl.Resources>
|
||||
<!-- Tab Header Style -->
|
||||
<Style TargetType="TabItem">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TabItem">
|
||||
<Border Name="Border"
|
||||
Background="#2D2D30"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="0,0,1,0"
|
||||
Padding="15,8">
|
||||
<ContentPresenter x:Name="ContentSite"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
ContentSource="Header"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="Border" Property="Background" Value="#094771"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="Border" Property="Background" Value="#3E3E42"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
</Style>
|
||||
</TabControl.Resources>
|
||||
|
||||
<!-- Tab 1: Utenti -->
|
||||
<TabItem Header="Utenti">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8">
|
||||
<TextBlock x:Name="SelectedAuctionBiddersCount"
|
||||
Text="Utenti: 0"
|
||||
Foreground="#00D800"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"/>
|
||||
</Border>
|
||||
|
||||
<!-- Bidders Grid -->
|
||||
<DataGrid Grid.Row="1"
|
||||
x:Name="SelectedAuctionBiddersGrid"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
Background="#1E1E1E"
|
||||
Foreground="#CCCCCC"
|
||||
RowBackground="#1E1E1E"
|
||||
AlternatingRowBackground="#252526"
|
||||
GridLinesVisibility="None"
|
||||
HeadersVisibility="Column"
|
||||
BorderThickness="0"
|
||||
FontSize="11">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="Background" Value="#2D2D30"/>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="Padding" Value="8,5"/>
|
||||
<Setter Property="FontSize" Value="11"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Utente" Binding="{Binding Username}" Width="*"/>
|
||||
<DataGridTextColumn Header="Punt." Binding="{Binding BidCount}" Width="50"/>
|
||||
<DataGridTextColumn Header="Ultima" Binding="{Binding LastBidTimeDisplay}" Width="70"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<!-- Footer Button -->
|
||||
<Button Grid.Row="2"
|
||||
x:Name="ClearBiddersButton"
|
||||
Content="Pulisci"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="5"
|
||||
Click="ClearBiddersButton_Click"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
<!-- Tab 2: Storia Puntate -->
|
||||
<TabItem Header="Storia Puntate">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8">
|
||||
<TextBlock x:Name="BidHistoryCount"
|
||||
Text="Ultime puntate: 0"
|
||||
Foreground="#00D800"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"/>
|
||||
</Border>
|
||||
|
||||
<!-- Storia Puntate Grid -->
|
||||
<DataGrid Grid.Row="1"
|
||||
x:Name="BidHistoryGrid"
|
||||
ItemsSource="{Binding ElementName=MultiAuctionsGrid, Path=SelectedItem.BidHistoryEntries}"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
CanUserAddRows="False"
|
||||
CanUserDeleteRows="False"
|
||||
CanUserResizeRows="False"
|
||||
HeadersVisibility="Column"
|
||||
GridLinesVisibility="Horizontal"
|
||||
HorizontalGridLinesBrush="#3E3E42"
|
||||
Background="#1E1E1E"
|
||||
Foreground="#CCCCCC"
|
||||
BorderThickness="0"
|
||||
RowHeight="28">
|
||||
|
||||
<DataGrid.Columns>
|
||||
<!-- Colonna Prezzo -->
|
||||
<DataGridTextColumn Header="PREZZO"
|
||||
Binding="{Binding PriceFormatted}"
|
||||
Width="70">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="#00D800"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="11"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<!-- Colonna Modalita' -->
|
||||
<DataGridTextColumn Header="TIPO"
|
||||
Binding="{Binding BidType}"
|
||||
Width="65">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="10"/>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding BidType}" Value="Auto">
|
||||
<Setter Property="Foreground" Value="#FFC107"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding BidType}" Value="Manuale">
|
||||
<Setter Property="Foreground" Value="#03A9F4"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<!-- Colonna Orario -->
|
||||
<DataGridTextColumn Header="ORARIO"
|
||||
Binding="{Binding TimeFormatted}"
|
||||
Width="70">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="#9E9E9E"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="10"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<!-- Colonna Utente -->
|
||||
<DataGridTextColumn Header="UTENTE"
|
||||
Binding="{Binding Username}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="Margin" Value="8,0,0,0"/>
|
||||
<Setter Property="FontSize" Value="11"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMyBid}" Value="True">
|
||||
<Setter Property="Foreground" Value="#00D800"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
|
||||
<!-- Stili righe -->
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="Background" Value="#1E1E1E"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#3E3E42"/>
|
||||
</Trigger>
|
||||
<DataTrigger Binding="{Binding IsMyBid}" Value="True">
|
||||
<Setter Property="Background" Value="#1A4D1A"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<!-- Stile header -->
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="Background" Value="#252526"/>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="FontSize" Value="10"/>
|
||||
<Setter Property="Padding" Value="8,6"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||||
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Border>
|
||||
|
||||
<!-- Vertical Splitter 2 -->
|
||||
<GridSplitter Grid.Column="3"
|
||||
Width="5"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#3E3E42"
|
||||
ResizeBehavior="PreviousAndNext"/>
|
||||
|
||||
<!-- BOTTOM RIGHT: Auction Log -->
|
||||
<Border Grid.Column="4" Style="{StaticResource CardBorder}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8" CornerRadius="4,4,0,0">
|
||||
<Grid>
|
||||
<TextBlock Text="Log Asta"
|
||||
Foreground="#00D800"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button x:Name="ClearLogButton"
|
||||
Content="Pulisci"
|
||||
HorizontalAlignment="Right"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
Padding="8,4"
|
||||
FontSize="10"
|
||||
Click="ClearLogButton_Click"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Auction Log Box -->
|
||||
<RichTextBox Grid.Row="1"
|
||||
x:Name="SelectedAuctionLog"
|
||||
IsReadOnly="True"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Background="#1E1E1E"
|
||||
Foreground="#CCCCCC"
|
||||
BorderThickness="0"
|
||||
FontFamily="Consolas"
|
||||
FontSize="10"
|
||||
Padding="8"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!-- Hidden user info panel for compatibility -->
|
||||
<Border x:Name="UserInfoPanel"
|
||||
Visibility="Collapsed">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock x:Name="UsernameText" Text=""/>
|
||||
<TextBlock x:Name="UserIdText" Text=""/>
|
||||
</StackPanel>
|
||||
<TextBlock x:Name="UserEmailText" Text=""/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -67,20 +67,6 @@ namespace AutoBidder.Controls
|
||||
RaiseEvent(new RoutedEventArgs(StopClickedEvent, this));
|
||||
}
|
||||
|
||||
private void LearningToggle_Changed(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(LearningToggledEvent, this));
|
||||
}
|
||||
|
||||
public static readonly RoutedEvent LearningToggledEvent = EventManager.RegisterRoutedEvent(
|
||||
"LearningToggled", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
public event RoutedEventHandler LearningToggled
|
||||
{
|
||||
add { AddHandler(LearningToggledEvent, value); }
|
||||
remove { RemoveHandler(LearningToggledEvent, value); }
|
||||
}
|
||||
|
||||
private void AddUrlButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(AddUrlClickedEvent, this));
|
||||
@@ -90,158 +76,15 @@ namespace AutoBidder.Controls
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(RemoveUrlClickedEvent, this));
|
||||
}
|
||||
|
||||
|
||||
private void RemoveAllButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(RemoveAllClickedEvent, this));
|
||||
}
|
||||
|
||||
private void RemoveFinishedButton_Click(object sender, RoutedEventArgs e)
|
||||
private void ExportButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(RemoveFinishedClickedEvent, this));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorna i contatori della barra strumenti. Li calcola il chiamante, che ha
|
||||
/// l'elenco completo: qui si presentano soltanto.
|
||||
/// </summary>
|
||||
public void UpdateCounters(int total, int active, int watch, int stopped, int won, int lost)
|
||||
{
|
||||
PillTotal.Text = total == 1 ? "1 asta" : $"{total} aste";
|
||||
PillActive.Text = $"{active} attive";
|
||||
PillWatch.Text = $"{watch} osserva";
|
||||
PillStopped.Text = $"{stopped} ferme";
|
||||
PillWon.Text = $"{won} vinte";
|
||||
PillLost.Text = $"{lost} perse";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stato del motore: traffico prodotto, aggancio all'orologio del server e ritardo
|
||||
/// medio di rete. Tutti e tre i valori arrivano già misurati dal chiamante.
|
||||
/// </summary>
|
||||
public void UpdateEngineStatus(long requestsSent, bool clockSynced, int clockSamples, double avgPingMs)
|
||||
{
|
||||
RequestsText.Text = requestsSent.ToString("N0");
|
||||
|
||||
// Senza campioni non c'è nulla da dire: meglio un trattino di un numero finto.
|
||||
if (clockSamples == 0)
|
||||
{
|
||||
ClockText.Text = "—";
|
||||
SetClockTone("Brush.TextFaint");
|
||||
ClockPill.ToolTip =
|
||||
"Nessuna misura: il motore non sta interrogando Bidoo.\n" +
|
||||
"Il pallino diventa verde quando l'orologio è agganciato e la rete risponde in fretta.";
|
||||
return;
|
||||
}
|
||||
|
||||
ClockText.Text = avgPingMs > 0 ? $"{avgPingMs:F0} ms" : "—";
|
||||
|
||||
var tone = !clockSynced ? "Brush.Warning" : PingTone(avgPingMs);
|
||||
SetClockTone(tone);
|
||||
|
||||
var sync = clockSynced
|
||||
? $"Orologio agganciato al server ({clockSamples} campioni)."
|
||||
: $"Orologio in aggancio: {clockSamples} campioni su 3.";
|
||||
|
||||
ClockPill.ToolTip =
|
||||
$"{sync}\n" +
|
||||
$"Ritardo medio di rete: {avgPingMs:F0} ms — {PingVerdict(avgPingMs)}.\n" +
|
||||
"Tieni l'anticipo puntata sopra questo valore.";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Soglie del ritardo di rete. Sono tarate su ciò che serve al motore: con un
|
||||
/// anticipo tipico di qualche centinaio di millisecondi, oltre i 400 ms di
|
||||
/// round-trip il margine per arrivare in tempo si assottiglia davvero.
|
||||
/// </summary>
|
||||
private static string PingTone(double ms) => ms switch
|
||||
{
|
||||
<= 0 => "Brush.TextFaint",
|
||||
< 150 => "Brush.Success",
|
||||
< 400 => "Brush.Warning",
|
||||
_ => "Brush.Danger"
|
||||
};
|
||||
|
||||
private static string PingVerdict(double ms) => ms switch
|
||||
{
|
||||
<= 0 => "non misurato",
|
||||
< 150 => "rete pronta",
|
||||
< 400 => "rete lenta, alza l'anticipo",
|
||||
_ => "rete molto lenta, puntate a rischio"
|
||||
};
|
||||
|
||||
private void SetClockTone(string brushKey)
|
||||
{
|
||||
ClockDot.SetResourceReference(ForegroundProperty, brushKey);
|
||||
ClockText.SetResourceReference(ForegroundProperty, brushKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stato del conto: puntate, credito e vincite da confermare.
|
||||
///
|
||||
/// <para>I valori arrivano annullabili di proposito: finché non si è connessi, o
|
||||
/// finché una risposta non è arrivata, la barra mostra un trattino invece di uno
|
||||
/// zero. Uno zero inventato è peggio di un dato mancante — è esattamente l'errore
|
||||
/// per cui le aste da confermare risultavano sempre nessuna.</para>
|
||||
/// </summary>
|
||||
public void UpdateAccountStatus(int? remainingBids, decimal? shopCredit, int? auctionsToConfirm,
|
||||
int? paidBids = null, int? freeBids = null)
|
||||
{
|
||||
RemainingBidsText.Text = remainingBids?.ToString("N0") ?? "—";
|
||||
|
||||
// Il saldo è la somma di due tasche, e Bidoo le consuma alternandole: sapere
|
||||
// quante sono gratis dice quanto costa davvero la prossima puntata.
|
||||
if (paidBids is { } paid && freeBids is { } free)
|
||||
{
|
||||
BidsSplitText.Text = $"({paid:N0} + {free:N0} gratis)";
|
||||
BidsSplitText.Visibility = Visibility.Visible;
|
||||
RemainingBidsPill.ToolTip = $"{remainingBids:N0} puntate sul conto: {paid:N0} a pagamento + {free:N0} gratuite";
|
||||
}
|
||||
else
|
||||
{
|
||||
BidsSplitText.Visibility = Visibility.Collapsed;
|
||||
RemainingBidsPill.ToolTip = "Puntate sul conto: a pagamento più gratuite";
|
||||
}
|
||||
|
||||
ShopCreditText.Text = shopCredit.HasValue ? $"{shopCredit.Value:N2} €" : "— €";
|
||||
|
||||
if (auctionsToConfirm is > 0)
|
||||
{
|
||||
BannerAsteDaRiscattare.Text = auctionsToConfirm.Value.ToString("N0");
|
||||
ToConfirmPill.Visibility = Visibility.Visible;
|
||||
ToConfirmPill.ToolTip = auctionsToConfirm.Value == 1
|
||||
? "1 asta vinta in attesa di conferma su Bidoo"
|
||||
: $"{auctionsToConfirm.Value} aste vinte in attesa di conferma su Bidoo";
|
||||
}
|
||||
else
|
||||
{
|
||||
ToConfirmPill.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Contatori del motore relativi alla sola asta selezionata.</summary>
|
||||
public void UpdateSelectedStats(int resets, int myBids, double avgPingMs, long polls, long pollErrors)
|
||||
{
|
||||
StatResets.Text = resets.ToString();
|
||||
StatMyBids.Text = myBids.ToString();
|
||||
StatPing.Text = avgPingMs > 0 ? $"{avgPingMs:F0} ms" : "—";
|
||||
StatPolls.Text = polls.ToString("N0");
|
||||
StatPollErrors.Text = pollErrors.ToString("N0");
|
||||
StatPollErrors.SetResourceReference(ForegroundProperty,
|
||||
pollErrors > 0 ? "Brush.Warning" : "Brush.Text");
|
||||
}
|
||||
|
||||
/// <summary>Verdetto di convenienza nella scheda Prodotto.</summary>
|
||||
public void SetVerdict(string label, string value, string tone)
|
||||
{
|
||||
VerdictLabel.Text = label;
|
||||
VerdictText.Text = value;
|
||||
VerdictText.SetResourceReference(ForegroundProperty, tone switch
|
||||
{
|
||||
"ok" => "Brush.Success",
|
||||
"danger" => "Brush.Danger",
|
||||
_ => "Brush.Text"
|
||||
});
|
||||
RaiseEvent(new RoutedEventArgs(ExportClickedEvent, this));
|
||||
}
|
||||
|
||||
private void MultiAuctionsGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -260,7 +103,7 @@ namespace AutoBidder.Controls
|
||||
}
|
||||
}), System.Windows.Threading.DispatcherPriority.Background);
|
||||
}
|
||||
|
||||
|
||||
RaiseEvent(new RoutedEventArgs(AuctionSelectionChangedEvent, this));
|
||||
}
|
||||
|
||||
@@ -270,16 +113,16 @@ namespace AutoBidder.Controls
|
||||
if (e.Key == Key.Delete && MultiAuctionsGrid.SelectedItem != null)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("[DELETE KEY] Tasto Canc premuto su asta selezionata");
|
||||
|
||||
|
||||
// Lancia direttamente l'evento senza chiedere conferma
|
||||
// La conferma verr� mostrata dal gestore RemoveUrlButton_Click
|
||||
// La conferma verrà mostrata dal gestore RemoveUrlButton_Click
|
||||
System.Diagnostics.Debug.WriteLine("[DELETE KEY] Lancio evento RemoveUrlClicked");
|
||||
RaiseEvent(new RoutedEventArgs(RemoveUrlClickedEvent, this));
|
||||
|
||||
|
||||
// Previeni che l'evento venga gestito da altri controlli
|
||||
e.Handled = true;
|
||||
}
|
||||
// NUOVO: Gestione esplicita frecce Su/Gi� per navigazione
|
||||
// NUOVO: Gestione esplicita frecce Su/Giù per navigazione
|
||||
else if (e.Key == Key.Up && MultiAuctionsGrid.Items.Count > 0)
|
||||
{
|
||||
int currentIndex = MultiAuctionsGrid.SelectedIndex;
|
||||
@@ -336,23 +179,27 @@ namespace AutoBidder.Controls
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(ClearGlobalLogClickedEvent, this));
|
||||
}
|
||||
|
||||
|
||||
private void OpenAuctionInternalButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(OpenAuctionInternalClickedEvent, this));
|
||||
}
|
||||
|
||||
|
||||
private void OpenAuctionExternalButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(OpenAuctionExternalClickedEvent, this));
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ExportAuctionButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(ExportAuctionClickedEvent, this));
|
||||
}
|
||||
|
||||
private void RefreshProductInfoButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(RefreshProductInfoClickedEvent, this));
|
||||
}
|
||||
|
||||
|
||||
private void ConnectionStatusButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(ConnectionStatusClickedEvent, this));
|
||||
@@ -363,6 +210,16 @@ namespace AutoBidder.Controls
|
||||
RaiseEvent(new RoutedEventArgs(BidBeforeDeadlineMsChangedEvent, this));
|
||||
}
|
||||
|
||||
private void SelectedCheckAuctionOpen_Changed(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(CheckAuctionOpenChangedEvent, this));
|
||||
}
|
||||
|
||||
private void SelectedMinPrice_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(MinPriceChangedEvent, this));
|
||||
}
|
||||
|
||||
private void SelectedMaxPrice_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(MaxPriceChangedEvent, this));
|
||||
@@ -388,13 +245,13 @@ namespace AutoBidder.Controls
|
||||
|
||||
public static readonly RoutedEvent RemoveUrlClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"RemoveUrlClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
public static readonly RoutedEvent RemoveFinishedClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"RemoveFinishedClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
|
||||
public static readonly RoutedEvent RemoveAllClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"RemoveAllClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
public static readonly RoutedEvent ExportClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"ExportClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
public static readonly RoutedEvent AuctionSelectionChangedEvent = EventManager.RegisterRoutedEvent(
|
||||
"AuctionSelectionChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
@@ -416,22 +273,30 @@ namespace AutoBidder.Controls
|
||||
public static readonly RoutedEvent BidBeforeDeadlineMsChangedEvent = EventManager.RegisterRoutedEvent(
|
||||
"BidBeforeDeadlineMsChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
public static readonly RoutedEvent CheckAuctionOpenChangedEvent = EventManager.RegisterRoutedEvent(
|
||||
"CheckAuctionOpenChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
public static readonly RoutedEvent MinPriceChangedEvent = EventManager.RegisterRoutedEvent(
|
||||
"MinPriceChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
public static readonly RoutedEvent MaxPriceChangedEvent = EventManager.RegisterRoutedEvent(
|
||||
"MaxPriceChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
public static readonly RoutedEvent MaxClicksChangedEvent = EventManager.RegisterRoutedEvent(
|
||||
"MaxClicksChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
|
||||
public static readonly RoutedEvent OpenAuctionInternalClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"OpenAuctionInternalClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
|
||||
public static readonly RoutedEvent OpenAuctionExternalClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"OpenAuctionExternalClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
|
||||
|
||||
public static readonly RoutedEvent ExportAuctionClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"ExportAuctionClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
public static readonly RoutedEvent RefreshProductInfoClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"RefreshProductInfoClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
|
||||
public static readonly RoutedEvent ConnectionStatusClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"ConnectionStatusClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
||||
|
||||
@@ -471,17 +336,17 @@ namespace AutoBidder.Controls
|
||||
add { AddHandler(RemoveUrlClickedEvent, value); }
|
||||
remove { RemoveHandler(RemoveUrlClickedEvent, value); }
|
||||
}
|
||||
|
||||
|
||||
public event RoutedEventHandler RemoveAllClicked
|
||||
{
|
||||
add { AddHandler(RemoveAllClickedEvent, value); }
|
||||
remove { RemoveHandler(RemoveAllClickedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler RemoveFinishedClicked
|
||||
public event RoutedEventHandler ExportClicked
|
||||
{
|
||||
add { AddHandler(RemoveFinishedClickedEvent, value); }
|
||||
remove { RemoveHandler(RemoveFinishedClickedEvent, value); }
|
||||
add { AddHandler(ExportClickedEvent, value); }
|
||||
remove { RemoveHandler(ExportClickedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler AuctionSelectionChanged
|
||||
@@ -526,6 +391,18 @@ namespace AutoBidder.Controls
|
||||
remove { RemoveHandler(BidBeforeDeadlineMsChangedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler CheckAuctionOpenChanged
|
||||
{
|
||||
add { AddHandler(CheckAuctionOpenChangedEvent, value); }
|
||||
remove { RemoveHandler(CheckAuctionOpenChangedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler MinPriceChanged
|
||||
{
|
||||
add { AddHandler(MinPriceChangedEvent, value); }
|
||||
remove { RemoveHandler(MinPriceChangedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler MaxPriceChanged
|
||||
{
|
||||
add { AddHandler(MaxPriceChangedEvent, value); }
|
||||
@@ -550,12 +427,18 @@ namespace AutoBidder.Controls
|
||||
remove { RemoveHandler(OpenAuctionExternalClickedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler ExportAuctionClicked
|
||||
{
|
||||
add { AddHandler(ExportAuctionClickedEvent, value); }
|
||||
remove { RemoveHandler(ExportAuctionClickedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler RefreshProductInfoClicked
|
||||
{
|
||||
add { AddHandler(RefreshProductInfoClickedEvent, value); }
|
||||
remove { RemoveHandler(RefreshProductInfoClickedEvent, value); }
|
||||
}
|
||||
|
||||
|
||||
public event RoutedEventHandler ConnectionStatusClicked
|
||||
{
|
||||
add { AddHandler(ConnectionStatusClickedEvent, value); }
|
||||
@@ -0,0 +1,128 @@
|
||||
<UserControl x:Class="AutoBidder.Controls.BrowserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="800" d:DesignWidth="1200"
|
||||
Background="#1E1E1E">
|
||||
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="RoundedButton" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="4"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
</Style>
|
||||
|
||||
<!-- Nav Button Style (text only) -->
|
||||
<Style x:Key="NavButton" TargetType="Button" BasedOn="{StaticResource RoundedButton}">
|
||||
<Setter Property="MinWidth" Value="50"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="FontSize" Value="11"/>
|
||||
<Setter Property="Padding" Value="8,0"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Browser Toolbar -->
|
||||
<Border Grid.Row="0" Background="#2D2D30" Padding="10" BorderBrush="#3E3E42" BorderThickness="0,0,0,1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Navigation Buttons (TEXT ONLY - NO SYMBOLS) -->
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||
<Button x:Name="BrowserBackButton"
|
||||
Content="Indietro"
|
||||
Margin="0,0,5,0"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource NavButton}"
|
||||
Click="BrowserBackButton_Click"
|
||||
ToolTip="Torna alla pagina precedente"/>
|
||||
|
||||
<Button x:Name="BrowserForwardButton"
|
||||
Content="Avanti"
|
||||
Margin="0,0,5,0"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource NavButton}"
|
||||
Click="BrowserForwardButton_Click"
|
||||
ToolTip="Vai alla pagina successiva"/>
|
||||
|
||||
<Button x:Name="BrowserRefreshButton"
|
||||
Content="Ricarica"
|
||||
Margin="0,0,5,0"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource NavButton}"
|
||||
Click="BrowserRefreshButton_Click"
|
||||
ToolTip="Ricarica la pagina corrente"/>
|
||||
|
||||
<Button x:Name="BrowserHomeButton"
|
||||
Content="Home"
|
||||
Margin="0,0,10,0"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource NavButton}"
|
||||
Click="BrowserHomeButton_Click"
|
||||
ToolTip="Vai alla homepage Bidoo"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Address Bar -->
|
||||
<Border Grid.Column="1"
|
||||
Background="#1E1E1E"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Margin="10,0">
|
||||
<TextBox x:Name="BrowserAddress"
|
||||
VerticalAlignment="Center"
|
||||
BorderThickness="0"
|
||||
Background="Transparent"
|
||||
Foreground="#CCCCCC"
|
||||
Padding="10,0"
|
||||
FontSize="13"
|
||||
IsReadOnly="True"
|
||||
Cursor="Arrow"
|
||||
ToolTip="Indirizzo della pagina corrente (non editabile)"/>
|
||||
</Border>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" Margin="10,0,0,0">
|
||||
<Button x:Name="BrowserAddAuctionButton"
|
||||
Content="Aggiungi Asta"
|
||||
Padding="20,7"
|
||||
FontSize="13"
|
||||
Background="#00D800"
|
||||
Style="{StaticResource RoundedButton}"
|
||||
Click="BrowserAddAuctionButton_Click"
|
||||
ToolTip="Aggiungi l'asta corrente al monitoraggio"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- WebView2 -->
|
||||
<Border Grid.Row="1" Background="#1E1E1E">
|
||||
<wv2:WebView2 x:Name="EmbeddedWebView"
|
||||
PreviewMouseRightButtonUp="EmbeddedWebView_PreviewMouseRightButtonUp"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,157 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
|
||||
namespace AutoBidder.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for BrowserControl.xaml
|
||||
/// REFACTORED: Gestione semplificata e diretta degli eventi WebView2
|
||||
/// </summary>
|
||||
public partial class BrowserControl : UserControl
|
||||
{
|
||||
public BrowserControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// ? NUOVO: Collega eventi NavigationStarting e NavigationCompleted direttamente qui
|
||||
EmbeddedWebView.NavigationStarting += WebView_NavigationStarting;
|
||||
EmbeddedWebView.NavigationCompleted += WebView_NavigationCompleted;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ? NUOVO: Aggiorna address bar quando inizia la navigazione
|
||||
/// </summary>
|
||||
private void WebView_NavigationStarting(object? sender, CoreWebView2NavigationStartingEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Aggiorna immediatamente l'address bar con l'URL di destinazione
|
||||
if (!string.IsNullOrEmpty(e.Uri))
|
||||
{
|
||||
BrowserAddress.Text = e.Uri;
|
||||
}
|
||||
|
||||
// Propaga l'evento al MainWindow
|
||||
var args = new BrowserNavigationEventArgs(BrowserNavigationStartingEvent, this)
|
||||
{
|
||||
Uri = e.Uri
|
||||
};
|
||||
RaiseEvent(args);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ? NUOVO: Aggiorna address bar quando la navigazione è completata
|
||||
/// </summary>
|
||||
private void WebView_NavigationCompleted(object? sender, CoreWebView2NavigationCompletedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Aggiorna l'address bar con l'URL finale (dopo eventuali redirect)
|
||||
var finalUrl = EmbeddedWebView?.Source?.ToString();
|
||||
if (!string.IsNullOrEmpty(finalUrl))
|
||||
{
|
||||
BrowserAddress.Text = finalUrl;
|
||||
}
|
||||
|
||||
// Propaga l'evento al MainWindow
|
||||
RaiseEvent(new RoutedEventArgs(BrowserNavigationCompletedEvent, this));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void BrowserBackButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(BrowserBackClickedEvent, this));
|
||||
}
|
||||
|
||||
private void BrowserForwardButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(BrowserForwardClickedEvent, this));
|
||||
}
|
||||
|
||||
private void BrowserRefreshButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(BrowserRefreshClickedEvent, this));
|
||||
}
|
||||
|
||||
private void BrowserHomeButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(BrowserHomeClickedEvent, this));
|
||||
}
|
||||
|
||||
private void BrowserAddAuctionButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(BrowserAddAuctionClickedEvent, this));
|
||||
}
|
||||
|
||||
private void EmbeddedWebView_PreviewMouseRightButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
// Routed Events
|
||||
public static readonly RoutedEvent BrowserBackClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"BrowserBackClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BrowserControl));
|
||||
|
||||
public static readonly RoutedEvent BrowserForwardClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"BrowserForwardClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BrowserControl));
|
||||
|
||||
public static readonly RoutedEvent BrowserRefreshClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"BrowserRefreshClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BrowserControl));
|
||||
|
||||
public static readonly RoutedEvent BrowserHomeClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"BrowserHomeClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BrowserControl));
|
||||
|
||||
public static readonly RoutedEvent BrowserAddAuctionClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"BrowserAddAuctionClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BrowserControl));
|
||||
|
||||
public static readonly RoutedEvent BrowserNavigationStartingEvent = EventManager.RegisterRoutedEvent(
|
||||
"BrowserNavigationStarting", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BrowserControl));
|
||||
|
||||
public static readonly RoutedEvent BrowserNavigationCompletedEvent = EventManager.RegisterRoutedEvent(
|
||||
"BrowserNavigationCompleted", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BrowserControl));
|
||||
|
||||
public event RoutedEventHandler BrowserBackClicked
|
||||
{
|
||||
add { AddHandler(BrowserBackClickedEvent, value); }
|
||||
remove { RemoveHandler(BrowserBackClickedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler BrowserForwardClicked
|
||||
{
|
||||
add { AddHandler(BrowserForwardClickedEvent, value); }
|
||||
remove { RemoveHandler(BrowserForwardClickedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler BrowserRefreshClicked
|
||||
{
|
||||
add { AddHandler(BrowserRefreshClickedEvent, value); }
|
||||
remove { RemoveHandler(BrowserRefreshClickedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler BrowserHomeClicked
|
||||
{
|
||||
add { AddHandler(BrowserHomeClickedEvent, value); }
|
||||
remove { RemoveHandler(BrowserHomeClickedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler BrowserAddAuctionClicked
|
||||
{
|
||||
add { AddHandler(BrowserAddAuctionClickedEvent, value); }
|
||||
remove { RemoveHandler(BrowserAddAuctionClickedEvent, value); }
|
||||
}
|
||||
}
|
||||
|
||||
public class BrowserNavigationEventArgs : RoutedEventArgs
|
||||
{
|
||||
public string? Uri { get; set; }
|
||||
|
||||
public BrowserNavigationEventArgs(RoutedEvent routedEvent, object source) : base(routedEvent, source)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,520 @@
|
||||
<UserControl x:Class="AutoBidder.Controls.SettingsControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="800" d:DesignWidth="1200"
|
||||
Background="#1E1E1E">
|
||||
|
||||
<UserControl.Resources>
|
||||
<!-- Modern Button Style -->
|
||||
<Style x:Key="ModernButton" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="4"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Padding" Value="20,10"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- Section Header Style -->
|
||||
<Style x:Key="SectionHeader" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Margin" Value="0,0,0,15"/>
|
||||
</Style>
|
||||
|
||||
<!-- Label Style -->
|
||||
<Style x:Key="FieldLabel" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="Margin" Value="0,0,0,5"/>
|
||||
</Style>
|
||||
|
||||
<!-- TextBox Style -->
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Background" Value="#252526"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- CheckBox Style -->
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="Margin" Value="0,6"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- RadioButton Style -->
|
||||
<Style TargetType="RadioButton">
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="Margin" Value="0,0,20,0"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- Info Box Style -->
|
||||
<Style x:Key="InfoBox" TargetType="Border">
|
||||
<Setter Property="Background" Value="#2D2D30"/>
|
||||
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
<Setter Property="Padding" Value="15"/>
|
||||
<Setter Property="Margin" Value="0,10,0,0"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Scrollable Content -->
|
||||
<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="30,20">
|
||||
|
||||
<!-- SEZIONE 1: Impostazioni Predefinite Aste -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20"
|
||||
Margin="0,0,0,20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Impostazioni Predefinite Aste"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Queste impostazioni verranno applicate automaticamente alle nuove aste."
|
||||
Foreground="#999999"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,20"/>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250"/>
|
||||
<ColumnDefinition Width="150"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Anticipo Puntata (millisecondi)" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center" ToolTip="Millisecondi prima della scadenza per puntare"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" x:Name="DefaultBidBeforeDeadlineMsTextBox" Text="200" Margin="10,10"/>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Verifica Stato Prima Di Puntare" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center" ToolTip="Controlla che l'asta sia ancora aperta prima di puntare"/>
|
||||
<CheckBox Grid.Row="1" Grid.Column="1" x:Name="DefaultCheckAuctionOpenCheckBox" Margin="10,10" VerticalAlignment="Center"/>
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Prezzo Minimo (€)" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="DefaultMinPriceTextBox" Text="0" Margin="10,10"/>
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="Prezzo Massimo (€)" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1" x:Name="DefaultMaxPriceTextBox" Text="0" Margin="10,10"/>
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="Max Click" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1" x:Name="DefaultMaxClicksTextBox" Text="0" Margin="10,10"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 2: Stato Iniziale Aste -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20"
|
||||
Margin="0,0,0,20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Stato Iniziale Aste"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Configura come devono comportarsi le aste quando vengono caricate o aggiunte."
|
||||
Foreground="#999999"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,20"/>
|
||||
|
||||
<!-- Stato all'apertura applicazione -->
|
||||
<TextBlock Text="Stato aste al caricamento dell'applicazione"
|
||||
Style="{StaticResource FieldLabel}"/>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,20">
|
||||
<RadioButton x:Name="LoadAuctionsStopped"
|
||||
Content="Fermate"
|
||||
GroupName="LoadState"
|
||||
IsChecked="True"
|
||||
ToolTip="Le aste salvate verranno caricate in stato fermo"/>
|
||||
<RadioButton x:Name="LoadAuctionsPaused"
|
||||
Content="In Pausa"
|
||||
GroupName="LoadState"
|
||||
ToolTip="Le aste salvate verranno caricate in pausa (pronte ad essere avviate)"/>
|
||||
<RadioButton x:Name="LoadAuctionsActive"
|
||||
Content="Attive"
|
||||
GroupName="LoadState"
|
||||
ToolTip="Le aste salvate verranno avviate automaticamente all'apertura"/>
|
||||
<RadioButton x:Name="LoadAuctionsRemember"
|
||||
Content="Ricorda Stato"
|
||||
GroupName="LoadState"
|
||||
ToolTip="Ogni asta ripristina lo stato che aveva alla chiusura (attiva/pausa/ferma)"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Stato nuove aste -->
|
||||
<TextBlock Text="Stato iniziale di una nuova asta aggiunta"
|
||||
Style="{StaticResource FieldLabel}"/>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
|
||||
<RadioButton x:Name="NewAuctionStopped"
|
||||
Content="Fermata"
|
||||
GroupName="NewAuctionState"
|
||||
IsChecked="True"
|
||||
ToolTip="Le nuove aste verranno aggiunte in stato fermo"/>
|
||||
<RadioButton x:Name="NewAuctionPaused"
|
||||
Content="In Pausa"
|
||||
GroupName="NewAuctionState"
|
||||
ToolTip="Le nuove aste verranno aggiunte in pausa"/>
|
||||
<RadioButton x:Name="NewAuctionActive"
|
||||
Content="Attiva"
|
||||
GroupName="NewAuctionState"
|
||||
ToolTip="Le nuove aste verranno avviate automaticamente"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Info Box -->
|
||||
<Border Style="{StaticResource InfoBox}" Margin="0,15,0,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Informazioni"
|
||||
FontWeight="Bold"
|
||||
Foreground="#007ACC"
|
||||
Margin="0,0,0,10"/>
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
LineHeight="18">
|
||||
• <Bold>Fermata:</Bold> L'asta non viene monitorata fino all'avvio manuale.<LineBreak/>
|
||||
• <Bold>In Pausa:</Bold> L'asta è pronta ma non punta automaticamente (utile per preparare le aste).<LineBreak/>
|
||||
• <Bold>Attiva:</Bold> L'asta viene monitorata e punta automaticamente quando necessario.<LineBreak/>
|
||||
• <Bold>Ricorda Stato:</Bold> Ogni asta ripristina lo stato esatto che aveva alla chiusura (SOVRASCRIVE le altre opzioni).<LineBreak/>
|
||||
<LineBreak/>
|
||||
<Bold>Consiglio:</Bold> Usa "Fermata" per caricare le aste senza avviarle, poi avvia manualmente quelle desiderate.<LineBreak/>
|
||||
Usa "Ricorda Stato" per riprendere esattamente da dove avevi lasciato.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 3: Protezione Account -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20"
|
||||
Margin="0,0,0,20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Protezione Account"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Impostazioni di sicurezza per proteggere il tuo account dalle puntate eccessive."
|
||||
Foreground="#999999"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,20"/>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250"/>
|
||||
<ColumnDefinition Width="150"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Puntate Minime da Mantenere -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="Puntate Minime da Mantenere"
|
||||
Foreground="#CCCCCC"
|
||||
Margin="0,10"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Numero minimo di puntate residue da mantenere sull'account. Se > 0, non punterà se scende sotto questa soglia (0 = nessun limite)"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1"
|
||||
x:Name="MinimumRemainingBidsTextBox"
|
||||
Text="0"
|
||||
Margin="10,10"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Info Box -->
|
||||
<Border Style="{StaticResource InfoBox}" Margin="0,15,0,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="🛡️ Protezione Puntate"
|
||||
FontWeight="Bold"
|
||||
Foreground="#00D800"
|
||||
Margin="0,0,0,10"/>
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
LineHeight="18">
|
||||
• Se impostato > 0, il sistema non punterà se le puntate residue scenderebbero sotto questa soglia.<LineBreak/>
|
||||
• Utile per mantenere sempre un "cuscinetto" di sicurezza sull'account.<LineBreak/>
|
||||
• Nel banner principale apparirà un indicatore colorato: <LineBreak/>
|
||||
- <Bold>Verde:</Bold> Puntate abbondanti (oltre +10 dal limite)<LineBreak/>
|
||||
- <Bold>Giallo:</Bold> Vicino al limite (entro 10 puntate)<LineBreak/>
|
||||
- <Bold>Rosso:</Bold> Al limite o sotto (puntate bloccate)<LineBreak/>
|
||||
• Valore 0 = nessun limite (comportamento default).
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 4: Limiti Log -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Limiti Log"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Configura il numero massimo di righe di log da mantenere in memoria per ottimizzare le performance."
|
||||
Foreground="#999999"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,20"/>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250"/>
|
||||
<ColumnDefinition Width="150"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="Max Righe Log per Asta"
|
||||
Foreground="#CCCCCC"
|
||||
Margin="0,10"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Numero massimo di righe di log da mantenere per ogni singola asta (raccomandato: 500-1000)"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1"
|
||||
x:Name="MaxLogLinesPerAuctionTextBox"
|
||||
Text="500"
|
||||
Margin="10,10"/>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||
Text="Max Righe Log Globale"
|
||||
Foreground="#CCCCCC"
|
||||
Margin="0,10"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Numero massimo di righe di log da mantenere nel log globale dell'applicazione (raccomandato: 1000-2000)"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1"
|
||||
x:Name="MaxGlobalLogLinesTextBox"
|
||||
Text="1000"
|
||||
Margin="10,10"/>
|
||||
|
||||
<!-- 📊 NUOVO: Max Storia Puntate -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||
Text="Max Puntate da Visualizzare"
|
||||
Foreground="#CCCCCC"
|
||||
Margin="0,10"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip="Numero massimo di puntate da mostrare nella scheda Storia Puntate (raccomandato: 20-50, 0 = tutte)"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1"
|
||||
x:Name="MaxBidHistoryEntriesTextBox"
|
||||
Text="20"
|
||||
Margin="10,10"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Info Box -->
|
||||
<Border Style="{StaticResource InfoBox}" Margin="0,15,0,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Informazioni"
|
||||
FontWeight="Bold"
|
||||
Foreground="#007ACC"
|
||||
Margin="0,0,0,10"/>
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
LineHeight="18">
|
||||
• I log più vecchi verranno automaticamente rimossi quando si raggiunge il limite.<LineBreak/>
|
||||
• Valori più bassi = meno memoria utilizzata, ma meno storico disponibile.<LineBreak/>
|
||||
• Valori più alti = più storico disponibile, ma maggiore uso di memoria.<LineBreak/>
|
||||
• Valori consigliati: 500-1000 per asta, 1000-2000 per log globale.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 5: Livello di Dettaglio Log -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20"
|
||||
Margin="0,20,0,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Livello di Dettaglio Log"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Configura il livello minimo dei messaggi da visualizzare nel log. Livelli più bassi mostrano solo messaggi critici, livelli più alti mostrano tutti i dettagli (utile per debug)."
|
||||
Foreground="#999999"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,20"/>
|
||||
|
||||
<!-- Radio Buttons per livello log -->
|
||||
<StackPanel>
|
||||
<RadioButton x:Name="LogLevelErrorOnly"
|
||||
Content="Solo Errori"
|
||||
GroupName="LogLevel"
|
||||
Margin="0,5"
|
||||
ToolTip="Mostra solo errori critici (uso minimo per produzione)"/>
|
||||
|
||||
<RadioButton x:Name="LogLevelNormal"
|
||||
Content="Normale (Errori + Avvisi)"
|
||||
GroupName="LogLevel"
|
||||
IsChecked="True"
|
||||
Margin="0,5"
|
||||
ToolTip="Mostra errori e avvisi (uso giornaliero raccomandato)"/>
|
||||
|
||||
<RadioButton x:Name="LogLevelInformational"
|
||||
Content="Informativo (Include operazioni completate)"
|
||||
GroupName="LogLevel"
|
||||
Margin="0,5"
|
||||
ToolTip="Mostra anche messaggi informativi e conferme (uso dettagliato)"/>
|
||||
|
||||
<RadioButton x:Name="LogLevelDebug"
|
||||
Content="Debug (Include dettagli tecnici)"
|
||||
GroupName="LogLevel"
|
||||
Margin="0,5"
|
||||
ToolTip="Mostra anche messaggi di debug per sviluppo"/>
|
||||
|
||||
<RadioButton x:Name="LogLevelTrace"
|
||||
Content="Trace (Tutto - molto verboso)"
|
||||
GroupName="LogLevel"
|
||||
Margin="0,5"
|
||||
ToolTip="Mostra ogni singola operazione (debug avanzato)"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Info Box -->
|
||||
<Border Style="{StaticResource InfoBox}" Margin="0,15,0,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="🔍 Guida alla Scelta"
|
||||
FontWeight="Bold"
|
||||
Foreground="#FFB700"
|
||||
Margin="0,0,0,10"/>
|
||||
<TextBlock Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,5">
|
||||
<Run>Solo Errori: Usa in produzione per vedere solo problemi critici.</Run>
|
||||
</TextBlock>
|
||||
<TextBlock Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,5">
|
||||
<Run>Normale: Raccomandato per uso giornaliero. Mostra errori e avvisi importanti.</Run>
|
||||
</TextBlock>
|
||||
<TextBlock Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,5">
|
||||
<Run>Informativo: Utile per seguire le operazioni principali (aggiunte aste, puntate).</Run>
|
||||
</TextBlock>
|
||||
<TextBlock Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,5">
|
||||
<Run>Debug: Per sviluppo. Mostra parametri chiamate API e valori interni.</Run>
|
||||
</TextBlock>
|
||||
<TextBlock Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,10">
|
||||
<Run>Trace: Debug avanzato. Mostra ogni singola chiamata (molto verboso).</Run>
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
FontWeight="Bold"
|
||||
Margin="0,5,0,5">Legenda colori log:</TextBlock>
|
||||
|
||||
<StackPanel>
|
||||
<TextBlock FontSize="11" Margin="0,2">
|
||||
<Run Foreground="#E81123">■ ROSSO</Run>
|
||||
<Run Foreground="#CCCCCC"> = Errori critici</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="11" Margin="0,2">
|
||||
<Run Foreground="#FFB700">■ ARANCIONE</Run>
|
||||
<Run Foreground="#CCCCCC"> = Avvisi</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="11" Margin="0,2">
|
||||
<Run Foreground="#64B4FF">■ BLU</Run>
|
||||
<Run Foreground="#CCCCCC"> = Informazioni</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="11" Margin="0,2">
|
||||
<Run Foreground="#00D800">■ VERDE</Run>
|
||||
<Run Foreground="#CCCCCC"> = Operazioni riuscite</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="11" Margin="0,2">
|
||||
<Run Foreground="#FF8CFF">■ MAGENTA</Run>
|
||||
<Run Foreground="#CCCCCC"> = Debug</Run>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="11" Margin="0,2">
|
||||
<Run Foreground="#A0A0A0">■ GRIGIO</Run>
|
||||
<Run Foreground="#CCCCCC"> = Trace</Run>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- Fixed Bottom Bar with Save/Cancel -->
|
||||
<Border Grid.Row="1"
|
||||
Background="#2D2D30"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="0,1,0,0"
|
||||
Padding="30,15">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="Salva"
|
||||
Background="#00D800"
|
||||
Style="{StaticResource ModernButton}"
|
||||
Margin="0,0,10,0"
|
||||
Padding="40,10"
|
||||
Click="SaveAllSettings_Click"/>
|
||||
|
||||
<Button Content="Annulla"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource ModernButton}"
|
||||
Padding="40,10"
|
||||
Click="CancelAllSettings_Click"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,90 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace AutoBidder.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SettingsControl.xaml
|
||||
/// </summary>
|
||||
public partial class SettingsControl : UserControl
|
||||
{
|
||||
public SettingsControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
// Non servono proprietà wrapper - MainWindow.xaml.cs accede direttamente ai controlli tramite:
|
||||
// Settings.DefaultBidBeforeDeadlineMsTextBox (definito nel XAML con x:Name)
|
||||
// Settings.MaxLogLinesPerAuctionTextBox (definito nel XAML con x:Name)
|
||||
// etc.
|
||||
|
||||
// Proprietà per limiti log
|
||||
public TextBox MaxLogLinesPerAuction => MaxLogLinesPerAuctionTextBox;
|
||||
public TextBox MaxGlobalLogLines => MaxGlobalLogLinesTextBox;
|
||||
|
||||
// ?? NUOVO: Proprietà per limite storia puntate
|
||||
public TextBox MaxBidHistoryEntries => MaxBidHistoryEntriesTextBox;
|
||||
|
||||
private void SaveDefaultsButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(SaveDefaultsClickedEvent, this));
|
||||
}
|
||||
|
||||
private void CancelDefaultsButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(CancelDefaultsClickedEvent, this));
|
||||
}
|
||||
|
||||
// Nuovo evento unificato - SALVA TUTTE LE IMPOSTAZIONI
|
||||
private void SaveAllSettings_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Salva impostazioni predefinite aste (export rimosso)
|
||||
RaiseEvent(new RoutedEventArgs(SaveDefaultsClickedEvent, this));
|
||||
|
||||
// UNICO MessageBox di conferma
|
||||
MessageBox.Show(
|
||||
"Tutte le impostazioni sono state salvate con successo.\n\nLe nuove impostazioni verranno applicate alle aste future.",
|
||||
"Impostazioni Salvate",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Information
|
||||
);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show(
|
||||
"Errore durante il salvataggio: " + ex.Message,
|
||||
"Errore",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Error
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private void CancelAllSettings_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Annulla tutte le modifiche
|
||||
RaiseEvent(new RoutedEventArgs(CancelDefaultsClickedEvent, this));
|
||||
}
|
||||
|
||||
// Routed Events
|
||||
public static readonly RoutedEvent SaveDefaultsClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"SaveDefaultsClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(SettingsControl));
|
||||
|
||||
public static readonly RoutedEvent CancelDefaultsClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"CancelDefaultsClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(SettingsControl));
|
||||
|
||||
public event RoutedEventHandler SaveDefaultsClicked
|
||||
{
|
||||
add { AddHandler(SaveDefaultsClickedEvent, value); }
|
||||
remove { RemoveHandler(SaveDefaultsClickedEvent, value); }
|
||||
}
|
||||
|
||||
public event RoutedEventHandler CancelDefaultsClicked
|
||||
{
|
||||
add { AddHandler(CancelDefaultsClickedEvent, value); }
|
||||
remove { RemoveHandler(CancelDefaultsClickedEvent, value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
<UserControl x:Class="AutoBidder.Controls.StatisticsControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="800" d:DesignWidth="1200"
|
||||
Background="#1E1E1E">
|
||||
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="RoundedButton" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="8"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Padding" Value="15,10"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<Border Grid.Row="0" Background="#2D2D30" Padding="15" BorderBrush="#3E3E42" BorderThickness="0,0,0,1">
|
||||
<Grid>
|
||||
<TextBlock Text="📊 Dati Statistici - Analisi Aste Chiuse"
|
||||
Foreground="#00D800"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<Button x:Name="LoadClosedAuctionsButton"
|
||||
Content="🔄 Carica Statistiche"
|
||||
HorizontalAlignment="Right"
|
||||
Background="#007ACC"
|
||||
Style="{StaticResource RoundedButton}"
|
||||
Click="LoadClosedAuctionsButton_Click"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- DataGrid Statistiche -->
|
||||
<DataGrid Grid.Row="1"
|
||||
x:Name="StatsDataGrid"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
Background="#1E1E1E"
|
||||
Foreground="#CCCCCC"
|
||||
RowBackground="#1E1E1E"
|
||||
AlternatingRowBackground="#252526"
|
||||
GridLinesVisibility="Horizontal"
|
||||
HeadersVisibility="Column"
|
||||
BorderThickness="0"
|
||||
Margin="15">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="Background" Value="#2D2D30"/>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Padding" Value="10,8"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||||
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="10,5"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Prodotto" Binding="{Binding ProductName}" Width="3*"/>
|
||||
<DataGridTextColumn Header="Prezzo Medio" Binding="{Binding AverageFinalPrice, StringFormat=€{0:F2}}" Width="120"/>
|
||||
<DataGridTextColumn Header="Click Medi" Binding="{Binding AverageBidsUsed, StringFormat={}{0:F0}}" Width="100"/>
|
||||
<DataGridTextColumn Header="Vincitore Frequente" Binding="{Binding Winner}" Width="150"/>
|
||||
<DataGridTextColumn Header="# Aste" Binding="{Binding Count}" Width="80"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<!-- Footer: Status -->
|
||||
<Border Grid.Row="2"
|
||||
Background="#252526"
|
||||
Padding="15"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="0,1,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="0">
|
||||
<TextBlock x:Name="StatsStatusText"
|
||||
Text="Pronto per caricare statistiche"
|
||||
FontSize="13"
|
||||
Foreground="#CCCCCC"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<TextBlock x:Name="ExportProgressText"
|
||||
Text=""
|
||||
FontSize="11"
|
||||
Foreground="#999999"
|
||||
Margin="0,5,0,0"
|
||||
Visibility="Collapsed"/>
|
||||
</StackPanel>
|
||||
|
||||
<ProgressBar Grid.Column="1"
|
||||
x:Name="ExportProgressBar"
|
||||
Width="200"
|
||||
Height="20"
|
||||
IsIndeterminate="True"
|
||||
Foreground="#007ACC"
|
||||
Background="#1E1E1E"
|
||||
BorderBrush="#3E3E42"
|
||||
Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace AutoBidder.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for StatisticsControl.xaml
|
||||
/// </summary>
|
||||
public partial class StatisticsControl : UserControl
|
||||
{
|
||||
public StatisticsControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void LoadClosedAuctionsButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RaiseEvent(new RoutedEventArgs(LoadClosedAuctionsClickedEvent, this));
|
||||
}
|
||||
|
||||
// Routed Events
|
||||
public static readonly RoutedEvent LoadClosedAuctionsClickedEvent = EventManager.RegisterRoutedEvent(
|
||||
"LoadClosedAuctionsClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(StatisticsControl));
|
||||
|
||||
public event RoutedEventHandler LoadClosedAuctionsClicked
|
||||
{
|
||||
add { AddHandler(LoadClosedAuctionsClickedEvent, value); }
|
||||
remove { RemoveHandler(LoadClosedAuctionsClickedEvent, value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,321 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using AutoBidder.Utilities;
|
||||
|
||||
namespace AutoBidder
|
||||
{
|
||||
/// <summary>
|
||||
/// Settings and configuration event handlers - REFACTORED
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Carica TUTTE le impostazioni salvate nei controlli UI
|
||||
/// </summary>
|
||||
private void LoadDefaultSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
var settings = Utilities.SettingsManager.Load();
|
||||
|
||||
// Carica impostazioni predefinite aste
|
||||
DefaultBidBeforeDeadlineMs.Text = settings.DefaultBidBeforeDeadlineMs.ToString();
|
||||
DefaultCheckAuctionOpen.IsChecked = settings.DefaultCheckAuctionOpenBeforeBid;
|
||||
DefaultMinPrice.Text = settings.DefaultMinPrice.ToString("F2", System.Globalization.CultureInfo.InvariantCulture);
|
||||
DefaultMaxPrice.Text = settings.DefaultMaxPrice.ToString("F2", System.Globalization.CultureInfo.InvariantCulture);
|
||||
DefaultMaxClicks.Text = settings.DefaultMaxClicks.ToString();
|
||||
|
||||
// Carica limiti log
|
||||
Settings.MaxLogLinesPerAuctionTextBox.Text = settings.MaxLogLinesPerAuction.ToString();
|
||||
Settings.MaxGlobalLogLinesTextBox.Text = settings.MaxGlobalLogLines.ToString();
|
||||
|
||||
// ?? NUOVO: Carica limite storia puntate
|
||||
Settings.MaxBidHistoryEntriesTextBox.Text = settings.MaxBidHistoryEntries.ToString();
|
||||
|
||||
// ?? NUOVO: Carica limite minimo puntate
|
||||
MinimumRemainingBidsTextBox.Text = settings.MinimumRemainingBids.ToString();
|
||||
|
||||
// ?? NUOVO: Carica livello log
|
||||
var logLevelErrorOnly = Settings.FindName("LogLevelErrorOnly") as System.Windows.Controls.RadioButton;
|
||||
var logLevelNormal = Settings.FindName("LogLevelNormal") as System.Windows.Controls.RadioButton;
|
||||
var logLevelInformational = Settings.FindName("LogLevelInformational") as System.Windows.Controls.RadioButton;
|
||||
var logLevelDebug = Settings.FindName("LogLevelDebug") as System.Windows.Controls.RadioButton;
|
||||
var logLevelTrace = Settings.FindName("LogLevelTrace") as System.Windows.Controls.RadioButton;
|
||||
|
||||
switch (settings.MinLogLevel)
|
||||
{
|
||||
case "ErrorOnly":
|
||||
if (logLevelErrorOnly != null) logLevelErrorOnly.IsChecked = true;
|
||||
break;
|
||||
case "Informational":
|
||||
if (logLevelInformational != null) logLevelInformational.IsChecked = true;
|
||||
break;
|
||||
case "Debug":
|
||||
if (logLevelDebug != null) logLevelDebug.IsChecked = true;
|
||||
break;
|
||||
case "Trace":
|
||||
if (logLevelTrace != null) logLevelTrace.IsChecked = true;
|
||||
break;
|
||||
case "Normal":
|
||||
default:
|
||||
if (logLevelNormal != null) logLevelNormal.IsChecked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// Aggiorna indicatore visivo
|
||||
UpdateMinBidsIndicator(settings.MinimumRemainingBids);
|
||||
|
||||
// Carica stato iniziale aste
|
||||
// ? NUOVO: Se RememberAuctionStates è attivo, seleziona "Ricorda Stato"
|
||||
if (settings.RememberAuctionStates)
|
||||
{
|
||||
Settings.LoadAuctionsRemember.IsChecked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Altrimenti usa DefaultStartAuctionsOnLoad
|
||||
switch (settings.DefaultStartAuctionsOnLoad)
|
||||
{
|
||||
case "Active":
|
||||
Settings.LoadAuctionsActive.IsChecked = true;
|
||||
break;
|
||||
case "Paused":
|
||||
Settings.LoadAuctionsPaused.IsChecked = true;
|
||||
break;
|
||||
case "Stopped":
|
||||
default:
|
||||
Settings.LoadAuctionsStopped.IsChecked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (settings.DefaultNewAuctionState)
|
||||
{
|
||||
case "Active":
|
||||
Settings.NewAuctionActive.IsChecked = true;
|
||||
break;
|
||||
case "Paused":
|
||||
Settings.NewAuctionPaused.IsChecked = true;
|
||||
break;
|
||||
case "Stopped":
|
||||
default:
|
||||
Settings.NewAuctionStopped.IsChecked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Log($"[OK] Impostazioni caricate: Anticipo={settings.DefaultBidBeforeDeadlineMs}ms, LogAsta={settings.MaxLogLinesPerAuction}, LogGlobale={settings.MaxGlobalLogLines}, MinBids={settings.MinimumRemainingBids}", Utilities.LogLevel.Info);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Caricamento impostazioni predefinite: {ex.Message}", Utilities.LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveDefaultsButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// ? Carica le impostazioni esistenti per non perdere gli altri valori
|
||||
var settings = Utilities.SettingsManager.Load() ?? new Utilities.AppSettings();
|
||||
|
||||
// === SEZIONE DEFAULTS: Validazione e Salvataggio ===
|
||||
if (int.TryParse(DefaultBidBeforeDeadlineMs.Text, out var bidMs) && bidMs >= 0 && bidMs <= 5000)
|
||||
{
|
||||
settings.DefaultBidBeforeDeadlineMs = bidMs;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[ERRORE] Valore anticipo puntata non valido (deve essere 0-5000ms)", LogLevel.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
settings.DefaultCheckAuctionOpenBeforeBid = DefaultCheckAuctionOpen.IsChecked ?? false;
|
||||
|
||||
if (double.TryParse(DefaultMinPrice.Text.Replace(',', '.'), System.Globalization.NumberStyles.Any,
|
||||
System.Globalization.CultureInfo.InvariantCulture, out var minPrice))
|
||||
{
|
||||
settings.DefaultMinPrice = minPrice;
|
||||
}
|
||||
|
||||
if (double.TryParse(DefaultMaxPrice.Text.Replace(',', '.'), System.Globalization.NumberStyles.Any,
|
||||
System.Globalization.CultureInfo.InvariantCulture, out var maxPrice))
|
||||
{
|
||||
settings.DefaultMaxPrice = maxPrice;
|
||||
}
|
||||
|
||||
if (int.TryParse(DefaultMaxClicks.Text, out var maxClicks))
|
||||
{
|
||||
settings.DefaultMaxClicks = maxClicks;
|
||||
}
|
||||
|
||||
// === SEZIONE DEFAULTS: Limiti Log ===
|
||||
if (int.TryParse(Settings.MaxLogLinesPerAuctionTextBox.Text, out var maxLogPerAuction) && maxLogPerAuction > 0)
|
||||
{
|
||||
settings.MaxLogLinesPerAuction = maxLogPerAuction;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[ERRORE] Valore max log per asta non valido (deve essere > 0)", LogLevel.Error);
|
||||
}
|
||||
|
||||
if (int.TryParse(Settings.MaxGlobalLogLinesTextBox.Text, out var maxGlobalLog) && maxGlobalLog > 0)
|
||||
{
|
||||
settings.MaxGlobalLogLines = maxGlobalLog;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[ERRORE] Valore max log globale non valido (deve essere > 0)", LogLevel.Error);
|
||||
}
|
||||
|
||||
// ?? NUOVO: Salva limite storia puntate
|
||||
if (int.TryParse(Settings.MaxBidHistoryEntriesTextBox.Text, out var maxBidHistory) && maxBidHistory >= 0)
|
||||
{
|
||||
settings.MaxBidHistoryEntries = maxBidHistory;
|
||||
|
||||
if (maxBidHistory > 0)
|
||||
{
|
||||
Log($"[HISTORY] Impostato limite storia puntate: {maxBidHistory}", LogLevel.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[HISTORY] Limite storia puntate disabilitato (mostra tutte)", LogLevel.Info);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[ERRORE] Valore limite storia puntate non valido (deve essere >= 0)", LogLevel.Error);
|
||||
}
|
||||
|
||||
// ?? NUOVO: Salva limite minimo puntate
|
||||
if (int.TryParse(MinimumRemainingBidsTextBox.Text, out var minBids) && minBids >= 0)
|
||||
{
|
||||
settings.MinimumRemainingBids = minBids;
|
||||
|
||||
// Aggiorna indicatore visivo
|
||||
UpdateMinBidsIndicator(minBids);
|
||||
|
||||
if (minBids > 0)
|
||||
{
|
||||
Log($"[LIMIT] Impostato limite minimo puntate: {minBids}", LogLevel.Info);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[ERRORE] Valore limite minimo puntate non valido (deve essere >= 0)", LogLevel.Error);
|
||||
}
|
||||
|
||||
// ?? NUOVO: Salva livello log
|
||||
var logLevelErrorOnly = Settings.FindName("LogLevelErrorOnly") as System.Windows.Controls.RadioButton;
|
||||
var logLevelNormal = Settings.FindName("LogLevelNormal") as System.Windows.Controls.RadioButton;
|
||||
var logLevelInformational = Settings.FindName("LogLevelInformational") as System.Windows.Controls.RadioButton;
|
||||
var logLevelDebug = Settings.FindName("LogLevelDebug") as System.Windows.Controls.RadioButton;
|
||||
var logLevelTrace = Settings.FindName("LogLevelTrace") as System.Windows.Controls.RadioButton;
|
||||
|
||||
string selectedLogLevel = "Normal"; // Default
|
||||
if (logLevelErrorOnly?.IsChecked == true)
|
||||
selectedLogLevel = "ErrorOnly";
|
||||
else if (logLevelInformational?.IsChecked == true)
|
||||
selectedLogLevel = "Informational";
|
||||
else if (logLevelDebug?.IsChecked == true)
|
||||
selectedLogLevel = "Debug";
|
||||
else if (logLevelTrace?.IsChecked == true)
|
||||
selectedLogLevel = "Trace";
|
||||
else if (logLevelNormal?.IsChecked == true)
|
||||
selectedLogLevel = "Normal";
|
||||
|
||||
settings.MinLogLevel = selectedLogLevel;
|
||||
|
||||
Log($"[LOG] Livello log impostato: {selectedLogLevel}", LogLevel.Info);
|
||||
|
||||
// === SEZIONE DEFAULTS: Stati Iniziali Aste ===
|
||||
var loadAuctionsRemember = Settings.FindName("LoadAuctionsRemember") as System.Windows.Controls.RadioButton;
|
||||
var loadAuctionsActive = Settings.FindName("LoadAuctionsActive") as System.Windows.Controls.RadioButton;
|
||||
var loadAuctionsPaused = Settings.FindName("LoadAuctionsPaused") as System.Windows.Controls.RadioButton;
|
||||
|
||||
// ? NUOVO: Gestione "Ricorda Stato"
|
||||
if (loadAuctionsRemember?.IsChecked == true)
|
||||
{
|
||||
// Attiva RememberAuctionStates
|
||||
settings.RememberAuctionStates = true;
|
||||
// DefaultStartAuctionsOnLoad diventa irrilevante, ma lo lasciamo a "Stopped" per compatibilità
|
||||
settings.DefaultStartAuctionsOnLoad = "Stopped";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Disattiva RememberAuctionStates e usa DefaultStartAuctionsOnLoad
|
||||
settings.RememberAuctionStates = false;
|
||||
settings.DefaultStartAuctionsOnLoad = loadAuctionsActive?.IsChecked == true ? "Active" :
|
||||
loadAuctionsPaused?.IsChecked == true ? "Paused" :
|
||||
"Stopped";
|
||||
}
|
||||
|
||||
var newAuctionActive = Settings.FindName("NewAuctionActive") as System.Windows.Controls.RadioButton;
|
||||
var newAuctionPaused = Settings.FindName("NewAuctionPaused") as System.Windows.Controls.RadioButton;
|
||||
|
||||
settings.DefaultNewAuctionState = newAuctionActive?.IsChecked == true ? "Active" :
|
||||
newAuctionPaused?.IsChecked == true ? "Paused" :
|
||||
"Stopped";
|
||||
|
||||
Utilities.SettingsManager.Save(settings);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Salvataggio impostazioni: {ex.Message}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void CancelDefaultsButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Ricarica defaults salvati
|
||||
LoadDefaultSettings();
|
||||
MessageBox.Show(this, "Impostazioni predefinite ripristinate.", "Annulla", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Ripristino impostazioni: {ex.Message}", LogLevel.Error);
|
||||
MessageBox.Show(this, "Errore durante ripristino: " + ex.Message, "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
// === HANDLER PER PULSANTI UNIFICATI ===
|
||||
|
||||
private void SaveAllSettings_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Salva tutte le impostazioni (ora solo defaults, export rimosso)
|
||||
SaveDefaultsButton_Click(sender, e);
|
||||
|
||||
MessageBox.Show(
|
||||
"Tutte le impostazioni sono state salvate con successo.\n\nLe nuove impostazioni verranno applicate alle aste future.",
|
||||
"Impostazioni Salvate",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Information
|
||||
);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Salvataggio impostazioni: {ex.Message}", LogLevel.Error);
|
||||
MessageBox.Show(this, "Errore durante salvataggio: " + ex.Message, "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void CancelAllSettings_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Annulla tutte le modifiche
|
||||
LoadDefaultSettings();
|
||||
MessageBox.Show(this, "Impostazioni ripristinate alle ultime salvate.", "Annulla", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Ripristino impostazioni: {ex.Message}", LogLevel.Error);
|
||||
MessageBox.Show(this, "Errore durante ripristino: " + ex.Message, "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,271 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Xml.Linq;
|
||||
using AutoBidder.Models;
|
||||
using AutoBidder.Utilities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AutoBidder
|
||||
{
|
||||
/// <summary>
|
||||
/// Statistics and closed auctions event handlers
|
||||
/// NOTA: Funzionalità statistiche temporaneamente disabilitate - in sviluppo
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
private void ExportStatsButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show(this, "Funzionalità statistiche in sviluppo", "Info", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
|
||||
private async void LoadClosedAuctionsButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show(this, "Funzionalità statistiche in sviluppo", "Info", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
|
||||
/* CODICE TEMPORANEAMENTE DISABILITATO - Statistiche in sviluppo
|
||||
try
|
||||
{
|
||||
StatsStatusText.Text = "Avvio caricamento statistiche...";
|
||||
var settings = Utilities.SettingsManager.Load();
|
||||
if (settings == null || string.IsNullOrWhiteSpace(settings.ExportPath) || !Directory.Exists(settings.ExportPath))
|
||||
{
|
||||
MessageBox.Show(this, "Percorso export non configurato o non valido. Configuralo nelle impostazioni.", "Carica Statistiche", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
StatsStatusText.Text = "Percorso export non valido";
|
||||
return;
|
||||
}
|
||||
|
||||
ExportProgressBar.Visibility = Visibility.Visible;
|
||||
ExportProgressText.Visibility = Visibility.Visible;
|
||||
ExportProgressText.Text = "Caricamento statistiche...";
|
||||
|
||||
var folder = settings.ExportPath!;
|
||||
var files = Directory.GetFiles(folder, "auction_*.*");
|
||||
if (files.Length == 0)
|
||||
{
|
||||
MessageBox.Show(this, "Nessun file di aste trovato nella cartella di export.", "Carica Statistiche", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
StatsStatusText.Text = "Nessun file trovato";
|
||||
ExportProgressBar.Visibility = Visibility.Collapsed;
|
||||
ExportProgressText.Visibility = Visibility.Collapsed;
|
||||
return;
|
||||
}
|
||||
|
||||
var aggregated = new Dictionary<string, List<ClosedAuctionRecord>>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
await Task.Run(() =>
|
||||
{
|
||||
foreach (var f in files)
|
||||
{
|
||||
try
|
||||
{
|
||||
var ext = Path.GetExtension(f).ToLowerInvariant();
|
||||
if (ext == ".json")
|
||||
{
|
||||
var txt = File.ReadAllText(f, Encoding.UTF8);
|
||||
try
|
||||
{
|
||||
var rec = System.Text.Json.JsonSerializer.Deserialize<ClosedAuctionRecord>(txt);
|
||||
if (rec != null)
|
||||
{
|
||||
var key = (rec.ProductName ?? ExtractProductFromFilename(f) ?? "<unknown>").Trim();
|
||||
if (!aggregated.ContainsKey(key)) aggregated[key] = new List<ClosedAuctionRecord>();
|
||||
aggregated[key].Add(rec);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
try
|
||||
{
|
||||
var arr = System.Text.Json.JsonSerializer.Deserialize<List<ClosedAuctionRecord>>(txt);
|
||||
if (arr != null)
|
||||
{
|
||||
foreach (var r in arr)
|
||||
{
|
||||
var key = (r.ProductName ?? ExtractProductFromFilename(f) ?? "<unknown>").Trim();
|
||||
if (!aggregated.ContainsKey(key)) aggregated[key] = new List<ClosedAuctionRecord>();
|
||||
aggregated[key].Add(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
else if (ext == ".xml")
|
||||
{
|
||||
try
|
||||
{
|
||||
var doc = XDocument.Load(f);
|
||||
var auctionElems = doc.Descendants("Auction");
|
||||
if (!auctionElems.Any()) auctionElems = doc.Descendants("AuctionExport");
|
||||
foreach (var n in auctionElems)
|
||||
{
|
||||
var name = n.Descendants("Name").FirstOrDefault()?.Value ?? n.Descendants("ProductName").FirstOrDefault()?.Value;
|
||||
double d = 0; double.TryParse(n.Descendants("FinalPrice").FirstOrDefault()?.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out d);
|
||||
int bids = 0; int.TryParse(n.Descendants("TotalBids").FirstOrDefault()?.Value, out bids);
|
||||
var winner = n.Descendants("Winner").FirstOrDefault()?.Value ?? string.Empty;
|
||||
var url = n.Descendants("OriginalUrl").FirstOrDefault()?.Value ?? string.Empty;
|
||||
var rec = new ClosedAuctionRecord { ProductName = name, FinalPrice = d == 0 ? null : (double?)d, Winner = winner, BidsUsed = bids, AuctionUrl = url };
|
||||
var key = (rec.ProductName ?? ExtractProductFromFilename(f) ?? "<unknown>").Trim();
|
||||
if (!aggregated.ContainsKey(key)) aggregated[key] = new List<ClosedAuctionRecord>();
|
||||
aggregated[key].Add(rec);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
else // CSV or text
|
||||
{
|
||||
try
|
||||
{
|
||||
var lines = File.ReadAllLines(f, Encoding.UTF8);
|
||||
string product = ExtractProductFromFilename(f) ?? "<unknown>";
|
||||
double? price = null; int? bids = null; string winner = string.Empty; string url = string.Empty;
|
||||
foreach (var l in lines)
|
||||
{
|
||||
var line = l.Trim();
|
||||
if (line.StartsWith("Name,") || line.StartsWith("ProductName,"))
|
||||
{
|
||||
var parts = line.Split(',', 2);
|
||||
if (parts.Length == 2) product = parts[1].Trim('"');
|
||||
}
|
||||
else if (line.StartsWith("FinalPrice", StringComparison.OrdinalIgnoreCase) || line.StartsWith("Price,"))
|
||||
{
|
||||
var parts = line.Split(',', 2);
|
||||
if (parts.Length == 2 && double.TryParse(parts[1].Trim('"').Replace('€', ' ').Trim(), NumberStyles.Any, CultureInfo.InvariantCulture, out var p)) price = p;
|
||||
}
|
||||
else if (line.StartsWith("TotalBids", StringComparison.OrdinalIgnoreCase) || line.StartsWith("BidsUsed", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var parts = line.Split(',', 2);
|
||||
if (parts.Length == 2 && int.TryParse(parts[1].Trim('"'), out var b)) bids = b;
|
||||
}
|
||||
else if (line.StartsWith("Winner", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var parts = line.Split(',', 2);
|
||||
if (parts.Length == 2) winner = parts[1].Trim('"');
|
||||
}
|
||||
else if (line.StartsWith("OriginalUrl", StringComparison.OrdinalIgnoreCase) || line.StartsWith("AuctionUrl", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var parts = line.Split(',', 2);
|
||||
if (parts.Length == 2) url = parts[1].Trim('"');
|
||||
}
|
||||
}
|
||||
var rec = new ClosedAuctionRecord { ProductName = product, FinalPrice = price, BidsUsed = bids, Winner = winner, AuctionUrl = url };
|
||||
var key = (rec.ProductName ?? ExtractProductFromFilename(f) ?? "<unknown>").Trim();
|
||||
if (!aggregated.ContainsKey(key)) aggregated[key] = new List<ClosedAuctionRecord>();
|
||||
aggregated[key].Add(rec);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
});
|
||||
|
||||
var stats = new List<object>();
|
||||
foreach (var kv in aggregated)
|
||||
{
|
||||
var list = kv.Value.Where(x => x.FinalPrice.HasValue || x.BidsUsed.HasValue).ToList();
|
||||
if (list.Count == 0) continue;
|
||||
var avgPrice = list.Where(x => x.FinalPrice.HasValue).Select(x => x.FinalPrice!.Value).DefaultIfEmpty(0).Average();
|
||||
var avgBids = list.Where(x => x.BidsUsed.HasValue).Select(x => x.BidsUsed!.Value).DefaultIfEmpty(0).Average();
|
||||
var winner = list.Where(x => !string.IsNullOrEmpty(x.Winner)).GroupBy(x => x.Winner).OrderByDescending(g => g.Count()).Select(g => g.Key).FirstOrDefault() ?? string.Empty;
|
||||
var example = list.FirstOrDefault(x => !string.IsNullOrEmpty(x.AuctionUrl))?.AuctionUrl ?? string.Empty;
|
||||
|
||||
stats.Add(new
|
||||
{
|
||||
ProductName = kv.Key,
|
||||
FinalPrice = avgPrice,
|
||||
Winner = winner,
|
||||
BidsUsed = (int)Math.Round(avgBids),
|
||||
AuctionUrl = example,
|
||||
Count = list.Count,
|
||||
AverageFinalPrice = avgPrice,
|
||||
AverageBidsUsed = avgBids
|
||||
});
|
||||
}
|
||||
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
StatsDataGrid.ItemsSource = stats.OrderByDescending(s => (int)s.GetType().GetProperty("Count")!.GetValue(s)).ToList();
|
||||
StatsStatusText.Text = $"Caricati {stats.Count} prodotti ({files.Length} file analizzati)";
|
||||
ExportProgressBar.Visibility = Visibility.Collapsed;
|
||||
ExportProgressText.Visibility = Visibility.Collapsed;
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
StatsStatusText.Text = "Errore caricamento statistiche";
|
||||
Log($"[ERRORE] Carica statistiche: {ex.Message}", LogLevel.Error);
|
||||
MessageBox.Show(this, "Errore durante caricamento statistiche: " + ex.Message, "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
ExportProgressBar.Visibility = Visibility.Collapsed;
|
||||
ExportProgressText.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private static string? ExtractProductFromFilename(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
var name = Path.GetFileNameWithoutExtension(path);
|
||||
var m = Regex.Match(name, @"auction_(.+)");
|
||||
if (m.Success)
|
||||
{
|
||||
var v = m.Groups[1].Value;
|
||||
if (Regex.IsMatch(v, "^\\d+$")) return null;
|
||||
return v.Replace('_', ' ');
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch { return null; }
|
||||
}
|
||||
|
||||
private async void ApplyInsightsButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show(this, "Funzionalità statistiche in sviluppo", "Info", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
|
||||
/* CODICE TEMPORANEAMENTE DISABILITATO
|
||||
try
|
||||
{
|
||||
if (_selectedAuction == null)
|
||||
{
|
||||
MessageBox.Show(this, "Seleziona un'asta prima di applicare le raccomandazioni.", "Applica Raccomandazioni", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
var optionsBuilder = new Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<Data.StatisticsContext>();
|
||||
var dbPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "stats.db");
|
||||
optionsBuilder.UseSqlite($"Data Source={dbPath}");
|
||||
using var ctx = new Data.StatisticsContext(optionsBuilder.Options);
|
||||
var svc = new Services.StatsService(ctx);
|
||||
|
||||
var (recBids, recPrice) = await svc.GetRecommendationAsync(_selectedAuction.AuctionInfo.Name, _selectedAuction.AuctionInfo.OriginalUrl);
|
||||
_selectedAuction.MaxClicks = Math.Max(_selectedAuction.MaxClicks, recBids);
|
||||
_selectedAuction.MaxPrice = Math.Max(_selectedAuction.MaxPrice, recPrice);
|
||||
Log($"[OK] Raccomandazioni: MaxClicks={recBids}, MaxPrice={recPrice:F2} applicate a {_selectedAuction.Name}", LogLevel.Success);
|
||||
UpdateSelectedAuctionDetails(_selectedAuction);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] ApplyInsights: {ex.Message}", LogLevel.Error);
|
||||
MessageBox.Show(this, "Errore applicazione raccomandazioni: " + ex.Message, "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private void FreeBidsStart_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show(this, "Funzionalità non ancora implementata", "Info", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
|
||||
private void FreeBidsStop_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show(this, "Funzionalità non ancora implementata", "Info", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,7 @@ using System.Windows;
|
||||
using AutoBidder.Models;
|
||||
using AutoBidder.ViewModels;
|
||||
using AutoBidder.Utilities;
|
||||
using AutoBidder.Services; // HtmlCacheService, HtmlResponse
|
||||
using AutoBidder.Net; // RequestPriority
|
||||
using AutoBidder.Services; // ? AGGIUNTO per RequestPriority e HtmlResponse
|
||||
|
||||
namespace AutoBidder
|
||||
{
|
||||
@@ -25,14 +24,14 @@ namespace AutoBidder
|
||||
return;
|
||||
}
|
||||
|
||||
string? auctionId;
|
||||
string auctionId;
|
||||
string? productName = null;
|
||||
string originalUrl;
|
||||
|
||||
// Verifica se � un URL o solo un ID
|
||||
// Verifica se è un URL o solo un ID
|
||||
if (input.Contains("bidoo.com") || input.Contains("http"))
|
||||
{
|
||||
// � un URL - estrai ID e nome prodotto dall'URL stesso
|
||||
// È un URL - estrai ID e nome prodotto dall'URL stesso
|
||||
originalUrl = input.Trim();
|
||||
auctionId = ExtractAuctionId(originalUrl);
|
||||
if (string.IsNullOrEmpty(auctionId))
|
||||
@@ -45,7 +44,7 @@ namespace AutoBidder
|
||||
}
|
||||
else
|
||||
{
|
||||
// � solo un ID numerico - costruisci URL generico
|
||||
// È solo un ID numerico - costruisci URL generico
|
||||
auctionId = input.Trim();
|
||||
originalUrl = $"https://it.bidoo.com/auction.php?a=asta_{auctionId}";
|
||||
}
|
||||
@@ -53,22 +52,22 @@ namespace AutoBidder
|
||||
// Verifica duplicati
|
||||
if (_auctionViewModels.Any(a => a.AuctionId == auctionId))
|
||||
{
|
||||
MessageBox.Show("Asta gi� monitorata!", "Duplicato", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
MessageBox.Show("Asta già monitorata!", "Duplicato", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
// ? MODIFICATO: Nome senza ID (gi� nella colonna separata)
|
||||
// ? MODIFICATO: Nome senza ID (già nella colonna separata)
|
||||
var displayName = string.IsNullOrEmpty(productName)
|
||||
? $"Asta {auctionId}"
|
||||
: DecodeAllHtmlEntities(productName);
|
||||
|
||||
|
||||
// CARICA IMPOSTAZIONI PREDEFINITE SALVATE
|
||||
var settings = Utilities.SettingsManager.Load();
|
||||
|
||||
|
||||
// ? Determina stato iniziale dalla configurazione
|
||||
bool isActive = false;
|
||||
bool isPaused = false;
|
||||
|
||||
|
||||
switch (settings.DefaultNewAuctionState)
|
||||
{
|
||||
case "Active":
|
||||
@@ -85,7 +84,7 @@ namespace AutoBidder
|
||||
isPaused = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Crea model con valori dalle impostazioni salvate e stato configurato
|
||||
var auction = new AuctionInfo
|
||||
{
|
||||
@@ -93,41 +92,39 @@ namespace AutoBidder
|
||||
Name = DecodeAllHtmlEntities(displayName),
|
||||
OriginalUrl = originalUrl,
|
||||
BidBeforeDeadlineMs = settings.DefaultBidBeforeDeadlineMs,
|
||||
CheckAuctionOpenBeforeBid = settings.DefaultCheckAuctionOpenBeforeBid,
|
||||
IsActive = isActive,
|
||||
IsPaused = isPaused
|
||||
};
|
||||
|
||||
|
||||
// Aggiungi al monitor
|
||||
_auctionMonitor.AddAuction(auction);
|
||||
|
||||
// Limiti del prodotto se ne ha di suoi, altrimenti i predefiniti. Lo stato
|
||||
// non si tocca: qui l'ha scelto l'utente nella finestra di aggiunta, mentre
|
||||
// lo stato del prodotto vale per le aste che entrano da sole.
|
||||
var limits = ProductRuleResolver.ResolveByName(auction.Name, settings);
|
||||
|
||||
|
||||
// Crea ViewModel con valori dalle impostazioni
|
||||
var vm = new AuctionViewModel(auction)
|
||||
{
|
||||
MaxPrice = limits.MaxPrice,
|
||||
MaxClicks = limits.MaxClicks
|
||||
MinPrice = settings.DefaultMinPrice,
|
||||
MaxPrice = settings.DefaultMaxPrice,
|
||||
MaxClicks = settings.DefaultMaxClicks
|
||||
};
|
||||
_auctionViewModels.Add(vm);
|
||||
|
||||
// ? Auto-start del monitoraggio se l'asta � attiva e il monitoraggio � fermo
|
||||
|
||||
// ? Auto-start del monitoraggio se l'asta è attiva e il monitoraggio è fermo
|
||||
if (isActive && !_isAutomationActive)
|
||||
{
|
||||
_auctionMonitor.Start();
|
||||
_isAutomationActive = true;
|
||||
Log($"[AUTO-START] Monitoraggio avviato automaticamente per nuova asta: {vm.Name}", LogLevel.Info);
|
||||
}
|
||||
|
||||
|
||||
SaveAuctions();
|
||||
UpdateTotalCount();
|
||||
UpdateGlobalControlButtons();
|
||||
|
||||
|
||||
var stateText = isActive ? (isPaused ? "Paused" : "Active") : "Stopped";
|
||||
Log($"[ADD] Asta aggiunta con stato={stateText}, Anticipo={settings.DefaultBidBeforeDeadlineMs}ms", Utilities.LogLevel.Info);
|
||||
|
||||
// ? NUOVO: Se il nome non � stato estratto, recuperalo in background DOPO l'aggiunta
|
||||
|
||||
// ? NUOVO: Se il nome non è stato estratto, recuperalo in background DOPO l'aggiunta
|
||||
if (string.IsNullOrEmpty(productName))
|
||||
{
|
||||
_ = FetchAuctionNameInBackgroundAsync(auction, vm);
|
||||
@@ -139,7 +136,7 @@ namespace AutoBidder
|
||||
MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Recupera il nome dell'asta in background e aggiorna l'UI quando completa
|
||||
/// </summary>
|
||||
@@ -153,16 +150,16 @@ namespace AutoBidder
|
||||
RequestPriority.Normal,
|
||||
bypassCache: false // Usa cache se disponibile
|
||||
);
|
||||
|
||||
|
||||
if (!response.Success)
|
||||
{
|
||||
Log($"[WARN] Impossibile recuperare nome per asta {auction.AuctionId}: {response.Error}", LogLevel.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Estrai nome dal <title>
|
||||
var match = System.Text.RegularExpressions.Regex.Match(response.Html, @"<title>([^<]+)</title>");
|
||||
|
||||
|
||||
if (match.Success)
|
||||
{
|
||||
var productName = match.Groups[1].Value.Trim().Replace(" - Bidoo", "");
|
||||
@@ -170,7 +167,7 @@ namespace AutoBidder
|
||||
productName = DecodeAllHtmlEntities(productName);
|
||||
// ? MODIFICATO: Nome senza ID
|
||||
var newName = productName;
|
||||
|
||||
|
||||
// Aggiorna il nome su thread UI
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
@@ -193,7 +190,7 @@ namespace AutoBidder
|
||||
Log($"[WARN] Errore recupero nome per asta {auction.AuctionId}: {ex.Message}", LogLevel.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Decodifica tutte le entity HTML, incluse quelle non standard come +
|
||||
/// </summary>
|
||||
@@ -201,24 +198,24 @@ namespace AutoBidder
|
||||
{
|
||||
if (string.IsNullOrEmpty(text))
|
||||
return text;
|
||||
|
||||
|
||||
// Prima decodifica entity standard
|
||||
var decoded = System.Net.WebUtility.HtmlDecode(text);
|
||||
|
||||
|
||||
// ? Poi sostituisci entity non standard che WebUtility.HtmlDecode non gestisce
|
||||
decoded = decoded.Replace("+", "+");
|
||||
decoded = decoded.Replace("=", "=");
|
||||
decoded = decoded.Replace("−", "-");
|
||||
decoded = decoded.Replace("×", "�");
|
||||
decoded = decoded.Replace("÷", "�");
|
||||
decoded = decoded.Replace("×", "×");
|
||||
decoded = decoded.Replace("÷", "÷");
|
||||
decoded = decoded.Replace("%", "%");
|
||||
decoded = decoded.Replace("$", "$");
|
||||
decoded = decoded.Replace("€", "�");
|
||||
decoded = decoded.Replace("£", "�");
|
||||
|
||||
decoded = decoded.Replace("€", "€");
|
||||
decoded = decoded.Replace("£", "£");
|
||||
|
||||
return decoded;
|
||||
}
|
||||
|
||||
|
||||
private async Task AddAuctionFromUrl(string url)
|
||||
{
|
||||
try
|
||||
@@ -228,28 +225,28 @@ namespace AutoBidder
|
||||
MessageBox.Show("URL asta non valido!", "Errore", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var auctionId = ExtractAuctionId(url);
|
||||
if (string.IsNullOrEmpty(auctionId))
|
||||
{
|
||||
MessageBox.Show("Impossibile estrarre ID asta!", "Errore", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Verifica duplicati
|
||||
if (_auctionViewModels.Any(a => a.AuctionId == auctionId))
|
||||
{
|
||||
MessageBox.Show("Asta gi� monitorata!", "Duplicato", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
MessageBox.Show("Asta già monitorata!", "Duplicato", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Fetch nome (opzionale)
|
||||
var name = $"Asta {auctionId}";
|
||||
try
|
||||
{
|
||||
// ? USA IL SERVIZIO CENTRALIZZATO
|
||||
var response = await _htmlCacheService.GetHtmlAsync(url, RequestPriority.Normal);
|
||||
|
||||
|
||||
if (response.Success)
|
||||
{
|
||||
var match2 = System.Text.RegularExpressions.Regex.Match(response.Html, @"<title>([^<]+)</title>");
|
||||
@@ -260,14 +257,14 @@ namespace AutoBidder
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
|
||||
// CARICA IMPOSTAZIONI PREDEFINITE SALVATE
|
||||
var settings = Utilities.SettingsManager.Load();
|
||||
|
||||
|
||||
// ? Determina stato iniziale dalla configurazione
|
||||
bool isActive = false;
|
||||
bool isPaused = false;
|
||||
|
||||
|
||||
switch (settings.DefaultNewAuctionState)
|
||||
{
|
||||
case "Active":
|
||||
@@ -284,7 +281,7 @@ namespace AutoBidder
|
||||
isPaused = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Crea model con valori dalle impostazioni salvate e stato configurato
|
||||
var auction = new AuctionInfo
|
||||
{
|
||||
@@ -292,37 +289,35 @@ namespace AutoBidder
|
||||
Name = DecodeAllHtmlEntities(name),
|
||||
OriginalUrl = url,
|
||||
BidBeforeDeadlineMs = settings.DefaultBidBeforeDeadlineMs,
|
||||
CheckAuctionOpenBeforeBid = settings.DefaultCheckAuctionOpenBeforeBid,
|
||||
IsActive = isActive,
|
||||
IsPaused = isPaused
|
||||
};
|
||||
|
||||
|
||||
// Aggiungi al monitor
|
||||
_auctionMonitor.AddAuction(auction);
|
||||
|
||||
// Limiti del prodotto se ne ha di suoi, altrimenti i predefiniti. Lo stato
|
||||
// non si tocca: qui l'ha scelto l'utente nella finestra di aggiunta, mentre
|
||||
// lo stato del prodotto vale per le aste che entrano da sole.
|
||||
var limits = ProductRuleResolver.ResolveByName(auction.Name, settings);
|
||||
|
||||
|
||||
// Crea ViewModel con valori dalle impostazioni
|
||||
var vm = new AuctionViewModel(auction)
|
||||
{
|
||||
MaxPrice = limits.MaxPrice,
|
||||
MaxClicks = limits.MaxClicks
|
||||
MinPrice = settings.DefaultMinPrice,
|
||||
MaxPrice = settings.DefaultMaxPrice,
|
||||
MaxClicks = settings.DefaultMaxClicks
|
||||
};
|
||||
_auctionViewModels.Add(vm);
|
||||
|
||||
// ? Auto-start del monitoraggio se l'asta � attiva e il monitoraggio � fermo
|
||||
|
||||
// ? Auto-start del monitoraggio se l'asta è attiva e il monitoraggio è fermo
|
||||
if (isActive && !_isAutomationActive)
|
||||
{
|
||||
_auctionMonitor.Start();
|
||||
_isAutomationActive = true;
|
||||
Log($"[AUTO-START] Monitoraggio avviato automaticamente per nuova asta: {vm.Name}", LogLevel.Info);
|
||||
}
|
||||
|
||||
|
||||
SaveAuctions();
|
||||
UpdateTotalCount();
|
||||
UpdateGlobalControlButtons();
|
||||
|
||||
|
||||
var stateText = isActive ? (isPaused ? "Paused" : "Active") : "Stopped";
|
||||
Log($"[ADD] Asta aggiunta con stato={stateText}, Anticipo={settings.DefaultBidBeforeDeadlineMs}ms", Utilities.LogLevel.Info);
|
||||
}
|
||||
@@ -339,7 +334,7 @@ namespace AutoBidder
|
||||
public async Task RefreshAuctionNameAsync(AuctionViewModel vm)
|
||||
{
|
||||
if (vm == null) return;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
Log($"[NAME REFRESH] Aggiornamento nome per: {vm.Name}", LogLevel.Info);
|
||||
@@ -350,7 +345,7 @@ namespace AutoBidder
|
||||
Log($"[ERRORE] Refresh nome asta: {ex.Message}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Controlla se ci sono aste con nomi generici e prova a recuperarli dopo un delay
|
||||
/// </summary>
|
||||
@@ -358,18 +353,18 @@ namespace AutoBidder
|
||||
{
|
||||
try
|
||||
{
|
||||
// Aspetta 30 secondi prima di ritentare (d� tempo alle altre richieste di completare)
|
||||
// Aspetta 30 secondi prima di ritentare (dà tempo alle altre richieste di completare)
|
||||
await System.Threading.Tasks.Task.Delay(TimeSpan.FromSeconds(30));
|
||||
|
||||
|
||||
// Trova aste con nomi generici "Asta XXXX"
|
||||
var auctionsWithGenericNames = _auctionViewModels
|
||||
.Where(vm => vm.Name.StartsWith("Asta ") && !vm.Name.Contains("Shop") && !vm.Name.Contains("�"))
|
||||
.Where(vm => vm.Name.StartsWith("Asta ") && !vm.Name.Contains("Shop") && !vm.Name.Contains("€"))
|
||||
.ToList();
|
||||
|
||||
|
||||
if (auctionsWithGenericNames.Count > 0)
|
||||
{
|
||||
Log($"[NAME RETRY] Trovate {auctionsWithGenericNames.Count} aste con nomi generici. Ritento recupero...", LogLevel.Info);
|
||||
|
||||
|
||||
// Ritenta il recupero per ognuna (con delay tra una e l'altra per non sovraccaricare)
|
||||
foreach (var vm in auctionsWithGenericNames)
|
||||
{
|
||||
@@ -383,7 +378,7 @@ namespace AutoBidder
|
||||
Log($"[WARN] Errore retry nomi aste: {ex.Message}", LogLevel.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void SaveAuctions()
|
||||
{
|
||||
try
|
||||
@@ -403,11 +398,11 @@ namespace AutoBidder
|
||||
{
|
||||
// ? Carica impostazioni
|
||||
var settings = Utilities.SettingsManager.Load();
|
||||
|
||||
|
||||
// Ottieni username corrente dalla sessione per ripristinare IsMyBid
|
||||
var session = _auctionMonitor.GetSession();
|
||||
var currentUsername = session?.Username ?? string.Empty;
|
||||
|
||||
|
||||
var auctions = Utilities.PersistenceManager.LoadAuctions();
|
||||
foreach (var auction in auctions)
|
||||
{
|
||||
@@ -416,7 +411,7 @@ namespace AutoBidder
|
||||
|
||||
// ? Decode HTML entities (incluse quelle non standard)
|
||||
try { auction.Name = DecodeAllHtmlEntities(auction.Name ?? string.Empty); } catch { }
|
||||
|
||||
|
||||
// ? Ripristina IsMyBid per tutte le puntate in RecentBids
|
||||
if (auction.RecentBids != null && auction.RecentBids.Count > 0 && !string.IsNullOrEmpty(currentUsername))
|
||||
{
|
||||
@@ -431,7 +426,7 @@ namespace AutoBidder
|
||||
if (settings.RememberAuctionStates)
|
||||
{
|
||||
// MODO 1: Ripristina lo stato salvato di ogni asta (IsActive e IsPaused vengono dal file salvato)
|
||||
// Non serve fare nulla, lo stato � gi� quello salvato nel file
|
||||
// Non serve fare nulla, lo stato è già quello salvato nel file
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -462,30 +457,50 @@ namespace AutoBidder
|
||||
|
||||
// ? Avvia monitoraggio se ci sono aste in stato Active O Paused
|
||||
bool hasActiveOrPausedAuctions = auctions.Any(a => a.IsActive);
|
||||
|
||||
|
||||
if (hasActiveOrPausedAuctions && auctions.Count > 0)
|
||||
{
|
||||
_auctionMonitor.Start();
|
||||
_isAutomationActive = true;
|
||||
|
||||
|
||||
if (settings.RememberAuctionStates)
|
||||
{
|
||||
var activeCount = auctions.Count(a => a.IsActive && !a.IsPaused);
|
||||
var pausedCount = auctions.Count(a => a.IsActive && a.IsPaused);
|
||||
Log($"[AUTO-START] Monitoraggio avviato: {activeCount} attive, {pausedCount} in pausa (stati ripristinati)", LogLevel.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
var loadState = settings.DefaultStartAuctionsOnLoad;
|
||||
if (loadState == "Active")
|
||||
{
|
||||
Log($"[AUTO-START] Monitoraggio avviato automaticamente per {auctions.Count} aste caricate in stato attivo", LogLevel.Info);
|
||||
}
|
||||
else if (loadState == "Paused")
|
||||
{
|
||||
Log($"[AUTO-START] Monitoraggio avviato automaticamente per {auctions.Count} aste caricate in pausa", LogLevel.Info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpdateTotalCount();
|
||||
UpdateGlobalControlButtons();
|
||||
|
||||
// Una riga sola: quante aste, in che stato, e se il motore è partito.
|
||||
|
||||
// Log sempre mostrato (anche con 0 aste)
|
||||
if (auctions.Count > 0)
|
||||
{
|
||||
var attive = auctions.Count(a => a.IsActive && !a.IsPaused);
|
||||
var osservate = auctions.Count(a => a.IsActive && a.IsPaused);
|
||||
var ferme = auctions.Count - attive - osservate;
|
||||
var come = settings.RememberAuctionStates ? "stati ripristinati" : $"stato iniziale {settings.DefaultStartAuctionsOnLoad}";
|
||||
Log($"[AVVIO] {auctions.Count} aste caricate ({attive} attive, {osservate} in osservazione, {ferme} ferme; {come})" +
|
||||
(hasActiveOrPausedAuctions ? "; motore avviato" : ""), LogLevel.Info);
|
||||
if (settings.RememberAuctionStates)
|
||||
{
|
||||
Log($"[LOAD] {auctions.Count} aste caricate con stati individuali ripristinati", LogLevel.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log($"[LOAD] {auctions.Count} aste caricate con stato iniziale: {settings.DefaultStartAuctionsOnLoad}", LogLevel.Info);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[AVVIO] Nessuna asta salvata", LogLevel.Info);
|
||||
Log("[LOAD] Nessuna asta salvata", LogLevel.Info);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -502,45 +517,44 @@ namespace AutoBidder
|
||||
if (vm == null || vm.AuctionInfo == null)
|
||||
{
|
||||
// Resetta campi se nessuna asta selezionata
|
||||
AuctionMonitor.ProductBuyNowPriceText.Text = "�";
|
||||
AuctionMonitor.ProductShippingCostText.Text = "�";
|
||||
AuctionMonitor.ProductWinLimitText.Text = "";
|
||||
RefreshProductVerdict(null);
|
||||
AuctionMonitor.ProductBuyNowPriceText.Text = "-";
|
||||
AuctionMonitor.ProductShippingCostText.Text = "-";
|
||||
AuctionMonitor.ProductWinLimitText.Text = "-";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var auction = vm.AuctionInfo;
|
||||
|
||||
|
||||
// CARICA AUTOMATICAMENTE INFO PRODOTTO SE NON PRESENTI
|
||||
if (!auction.BuyNowPrice.HasValue && !auction.ShippingCost.HasValue)
|
||||
{
|
||||
// Carica in background senza bloccare l'UI
|
||||
_ = LoadProductInfoInBackgroundAsync(auction);
|
||||
}
|
||||
|
||||
|
||||
// Aggiorna i campi delle impostazioni
|
||||
UpdateAuctionSettingsDisplay(vm);
|
||||
|
||||
|
||||
// Aggiorna Valore (Compra Subito)
|
||||
if (auction.BuyNowPrice.HasValue)
|
||||
{
|
||||
AuctionMonitor.ProductBuyNowPriceText.Text = $"{auction.BuyNowPrice.Value:F2}�";
|
||||
AuctionMonitor.ProductBuyNowPriceText.Text = $"{auction.BuyNowPrice.Value:F2}€";
|
||||
}
|
||||
else
|
||||
{
|
||||
AuctionMonitor.ProductBuyNowPriceText.Text = "�";
|
||||
AuctionMonitor.ProductBuyNowPriceText.Text = "-";
|
||||
}
|
||||
|
||||
|
||||
// Aggiorna Spese di Spedizione
|
||||
if (auction.ShippingCost.HasValue)
|
||||
{
|
||||
AuctionMonitor.ProductShippingCostText.Text = $"{auction.ShippingCost.Value:F2}�";
|
||||
AuctionMonitor.ProductShippingCostText.Text = $"{auction.ShippingCost.Value:F2}€";
|
||||
}
|
||||
else
|
||||
{
|
||||
AuctionMonitor.ProductShippingCostText.Text = "�";
|
||||
AuctionMonitor.ProductShippingCostText.Text = "-";
|
||||
}
|
||||
|
||||
|
||||
// Aggiorna Limiti di Vincita
|
||||
if (auction.HasWinLimit && !string.IsNullOrWhiteSpace(auction.WinLimitDescription))
|
||||
{
|
||||
@@ -548,18 +562,14 @@ namespace AutoBidder
|
||||
}
|
||||
else if (!auction.HasWinLimit)
|
||||
{
|
||||
AuctionMonitor.ProductWinLimitText.Text = "";
|
||||
AuctionMonitor.ProductWinLimitText.Text = "Nessun limite";
|
||||
}
|
||||
else
|
||||
{
|
||||
AuctionMonitor.ProductWinLimitText.Text = "";
|
||||
AuctionMonitor.ProductWinLimitText.Text = "-";
|
||||
}
|
||||
|
||||
// Verdetto di convenienza: costo totale se vinci contro valore del prodotto.
|
||||
RefreshProductVerdict(vm);
|
||||
RefreshSelectedStats(vm);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Carica le informazioni del prodotto (e nome se generico) in background quando selezioni un'asta
|
||||
/// </summary>
|
||||
@@ -567,29 +577,29 @@ namespace AutoBidder
|
||||
{
|
||||
try
|
||||
{
|
||||
bool hasGenericName = auction.Name.StartsWith("Asta ") &&
|
||||
!auction.Name.Contains("Shop") &&
|
||||
!auction.Name.Contains("�") &&
|
||||
bool hasGenericName = auction.Name.StartsWith("Asta ") &&
|
||||
!auction.Name.Contains("Shop") &&
|
||||
!auction.Name.Contains("€") &&
|
||||
!auction.Name.Contains("Buono") &&
|
||||
!auction.Name.Contains("Carburante");
|
||||
|
||||
|
||||
Log($"[PRODUCT INFO] Caricamento automatico per: {auction.Name}{(hasGenericName ? " (+ nome generico)" : "")}", Utilities.LogLevel.Info);
|
||||
|
||||
|
||||
// ? USA IL SERVIZIO CENTRALIZZATO
|
||||
var response = await _htmlCacheService.GetHtmlAsync(
|
||||
auction.OriginalUrl,
|
||||
RequestPriority.Normal, // Priorit� alta per info prodotto
|
||||
RequestPriority.High, // Priorità alta per info prodotto
|
||||
bypassCache: false
|
||||
);
|
||||
|
||||
|
||||
if (!response.Success)
|
||||
{
|
||||
Log($"[PRODUCT INFO] Errore caricamento: {response.Error}", Utilities.LogLevel.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
bool updated = false;
|
||||
|
||||
|
||||
// 1. ? Se nome generico, estrai nome reale dal <title>
|
||||
if (hasGenericName)
|
||||
{
|
||||
@@ -600,26 +610,26 @@ namespace AutoBidder
|
||||
productName = DecodeAllHtmlEntities(productName);
|
||||
// ? MODIFICATO: Nome senza ID
|
||||
var newName = productName;
|
||||
|
||||
|
||||
auction.Name = newName;
|
||||
updated = true;
|
||||
Log($"[NAME] Nome recuperato: {productName}{(response.FromCache ? " (cached)" : "")}", LogLevel.Info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 2. ? Estrai informazioni prodotto (prezzo, spedizione, limiti)
|
||||
var extracted = Utilities.ProductValueCalculator.ExtractProductInfo(response.Html, auction);
|
||||
if (extracted)
|
||||
{
|
||||
updated = true;
|
||||
Log($"[PRODOTTO] {auction.Name}: valore {auction.BuyNowPrice:F2} EUR, spedizione {auction.ShippingCost:F2} EUR{(response.FromCache ? " (cached)" : "")}", Utilities.LogLevel.Success);
|
||||
Log($"[PRODUCT INFO] Valore={auction.BuyNowPrice:F2}€, Spedizione={auction.ShippingCost:F2}€{(response.FromCache ? " (cached)" : "")}", Utilities.LogLevel.Success);
|
||||
}
|
||||
|
||||
// 3. ? Salva e aggiorna UI solo se qualcosa � cambiato
|
||||
|
||||
// 3. ? Salva e aggiorna UI solo se qualcosa è cambiato
|
||||
if (updated)
|
||||
{
|
||||
SaveAuctions();
|
||||
|
||||
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
// Refresh griglia per mostrare nome aggiornato
|
||||
@@ -629,7 +639,7 @@ namespace AutoBidder
|
||||
MultiAuctionsGrid.ItemsSource = null;
|
||||
MultiAuctionsGrid.ItemsSource = tempSource;
|
||||
}
|
||||
|
||||
|
||||
// Refresh dettagli se ancora selezionata
|
||||
if (_selectedAuction != null && _selectedAuction.AuctionId == auction.AuctionId)
|
||||
{
|
||||
@@ -14,8 +14,7 @@ namespace AutoBidder
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
// sender null = azione interna (non richiesta dall'utente): si evita di loggarla.
|
||||
private void StartButton_Click(object? sender, RoutedEventArgs e)
|
||||
private void StartButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -53,7 +52,7 @@ namespace AutoBidder
|
||||
}
|
||||
}
|
||||
|
||||
private void StopButton_Click(object? sender, RoutedEventArgs e)
|
||||
private void StopButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -85,31 +84,22 @@ namespace AutoBidder
|
||||
}
|
||||
}
|
||||
|
||||
private async void PauseAllButton_Click(object? sender, RoutedEventArgs e)
|
||||
private async void PauseAllButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Osserva vale anche per le aste ferme: servono comunque i motori accesi
|
||||
// per seguirle, semplicemente non punteranno.
|
||||
foreach (var vm in _auctionViewModels)
|
||||
foreach (var vm in _auctionViewModels.Where(a => a.IsActive))
|
||||
{
|
||||
vm.IsActive = true;
|
||||
vm.IsPaused = true;
|
||||
}
|
||||
|
||||
if (_auctionViewModels.Count > 0 && !_isAutomationActive)
|
||||
{
|
||||
_auctionMonitor.Start();
|
||||
_isAutomationActive = true;
|
||||
}
|
||||
|
||||
|
||||
// ? Salva gli stati aggiornati su disco
|
||||
SaveAuctions();
|
||||
UpdateGlobalControlButtons();
|
||||
|
||||
|
||||
if (sender != null) // Solo se chiamato dall'utente
|
||||
{
|
||||
Log("[OSSERVA] Tutte le aste seguite senza puntare", LogLevel.Warning);
|
||||
Log("[PAUSE ALL] Tutte le aste in pausa", LogLevel.Warning);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -197,7 +187,7 @@ namespace AutoBidder
|
||||
|
||||
// Conferma rimozione
|
||||
var result = MessageBox.Show(
|
||||
$"Rimuovere l'asta dal monitoraggio?\n\n{auctionName}\n(ID: {auctionId})\n\nL'asta verr� eliminata dalla lista e non sar� pi� monitorata.",
|
||||
$"Rimuovere l'asta dal monitoraggio?\n\n{auctionName}\n(ID: {auctionId})\n\nL'asta verrà eliminata dalla lista e non sarà più monitorata.",
|
||||
"Conferma Rimozione",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
@@ -226,7 +216,7 @@ namespace AutoBidder
|
||||
// ? NUOVO: Sposta il focus sulla riga successiva
|
||||
if (_auctionViewModels.Count > 0)
|
||||
{
|
||||
// Se c'� ancora almeno un'asta nella lista
|
||||
// Se c'è ancora almeno un'asta nella lista
|
||||
int newIndex;
|
||||
|
||||
if (currentIndex >= _auctionViewModels.Count)
|
||||
@@ -288,7 +278,7 @@ namespace AutoBidder
|
||||
|
||||
// Conferma rimozione
|
||||
var result = MessageBox.Show(
|
||||
$"Rimuovere TUTTE le aste dal monitoraggio?\n\nSono presenti {count} aste monitorate.\n\nTutte le aste verranno eliminate dalla lista e non saranno pi� monitorate.",
|
||||
$"Rimuovere TUTTE le aste dal monitoraggio?\n\nSono presenti {count} aste monitorate.\n\nTutte le aste verranno eliminate dalla lista e non saranno più monitorate.",
|
||||
"Conferma Rimozione Totale",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Warning);
|
||||
@@ -404,10 +394,9 @@ namespace AutoBidder
|
||||
if (string.IsNullOrEmpty(url))
|
||||
url = $"https://it.bidoo.com/auction.php?a=asta_{_selectedAuction.AuctionId}";
|
||||
|
||||
// Naviga alla scheda Browser, in modalita' browser (non catalogo)
|
||||
// Naviga alla scheda Browser
|
||||
TabBrowser.IsChecked = true;
|
||||
Browser.ShowBrowser();
|
||||
|
||||
|
||||
// Naviga all'URL
|
||||
if (EmbeddedWebView?.CoreWebView2 != null)
|
||||
{
|
||||
@@ -417,7 +406,7 @@ namespace AutoBidder
|
||||
else
|
||||
{
|
||||
Log($"[WARN] Browser interno non ancora inizializzato", LogLevel.Warning);
|
||||
MessageBox.Show("Il browser interno non � ancora pronto.\nRiprova tra qualche secondo.", "Browser", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
MessageBox.Show("Il browser interno non è ancora pronto.\nRiprova tra qualche secondo.", "Browser", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -456,6 +445,31 @@ namespace AutoBidder
|
||||
}
|
||||
}
|
||||
|
||||
private void ExportAuctionButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (_selectedAuction == null)
|
||||
{
|
||||
MessageBox.Show("Seleziona un'asta dalla griglia", "Nessuna Selezione", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
MessageBox.Show(
|
||||
$"Esportazione singola asta:\n\n{_selectedAuction.Name}\n(ID: {_selectedAuction.AuctionId})\n\nFunzionalità in sviluppo.\nUsa 'Esporta' dalla toolbar per esportare tutte le aste.",
|
||||
"Export Asta",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Information);
|
||||
|
||||
Log($"[INFO] Richiesto export singolo per asta: {_selectedAuction.Name} (funzionalità in sviluppo)", LogLevel.Info);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Export asta: {ex.Message}", LogLevel.Error);
|
||||
MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private async void RefreshProductInfoButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
@@ -489,12 +503,12 @@ namespace AutoBidder
|
||||
double shippingCost = auction.ShippingCost ?? 0;
|
||||
double totalValue = buyNowPrice + shippingCost;
|
||||
|
||||
// Max EUR = 40% del valore TOTALE (pi� conservativo del 50%)
|
||||
// Max EUR = 40% del valore TOTALE (più conservativo del 50%)
|
||||
double suggestedMaxPrice = totalValue * 0.40;
|
||||
suggestedMaxPrice = Math.Round(suggestedMaxPrice, 2);
|
||||
|
||||
// CALCOLA MAX CLICKS (numero massimo puntate conservativo)
|
||||
// Formula: (Valore Totale - Max EUR) / 0.20� per puntata
|
||||
// Formula: (Valore Totale - Max EUR) / 0.20€ per puntata
|
||||
// Poi riduciamo del 20% per maggiore margine di sicurezza
|
||||
int maxClicksTheoretical = (int)Math.Floor((totalValue - suggestedMaxPrice) / 0.20);
|
||||
int suggestedMaxClicks = (int)Math.Floor(maxClicksTheoretical * 0.80); // 80% del teorico
|
||||
@@ -502,12 +516,12 @@ namespace AutoBidder
|
||||
// Minimo 10 puntate per dare comunque una chance
|
||||
if (suggestedMaxClicks < 10) suggestedMaxClicks = 10;
|
||||
|
||||
Log($"[LIMITI] Valore={buyNowPrice:F2}� + Extra={shippingCost:F2}� = Tot={totalValue:F2}� ? MaxEUR={suggestedMaxPrice:F2}� (40%), MaxClicks={suggestedMaxClicks}", LogLevel.Info);
|
||||
Log($"[LIMITI] Valore={buyNowPrice:F2}€ + Extra={shippingCost:F2}€ = Tot={totalValue:F2}€ ? MaxEUR={suggestedMaxPrice:F2}€ (40%), MaxClicks={suggestedMaxClicks}", LogLevel.Info);
|
||||
|
||||
// CHIEDI CONFERMA
|
||||
var result = MessageBox.Show(
|
||||
$"Limiti suggeriti (conservativi):\n\n" +
|
||||
$"Max EUR: {suggestedMaxPrice:F2}�\n" +
|
||||
$"Max EUR: {suggestedMaxPrice:F2}€\n" +
|
||||
$"Max Clicks: {suggestedMaxClicks}\n\n" +
|
||||
$"Applicare questi valori?",
|
||||
"Conferma Limiti",
|
||||
@@ -530,7 +544,7 @@ namespace AutoBidder
|
||||
// SALVA
|
||||
SaveAuctions();
|
||||
|
||||
Log($"[LIMITI] Applicati: MaxEUR={suggestedMaxPrice:F2}�, MaxClicks={suggestedMaxClicks}", LogLevel.Success);
|
||||
Log($"[LIMITI] Applicati: MaxEUR={suggestedMaxPrice:F2}€, MaxClicks={suggestedMaxClicks}", LogLevel.Success);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -560,8 +574,8 @@ namespace AutoBidder
|
||||
|
||||
if (currentIndex <= 0)
|
||||
{
|
||||
// Gi� in cima o non trovata
|
||||
Log($"[MOVE] L'asta � gi� in cima alla lista", LogLevel.Info);
|
||||
// Già in cima o non trovata
|
||||
Log($"[MOVE] L'asta è già in cima alla lista", LogLevel.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -601,8 +615,8 @@ namespace AutoBidder
|
||||
|
||||
if (currentIndex < 0 || currentIndex >= _auctionViewModels.Count - 1)
|
||||
{
|
||||
// Gi� in fondo o non trovata
|
||||
Log($"[MOVE] L'asta � gi� in fondo alla lista", LogLevel.Info);
|
||||
// Già in fondo o non trovata
|
||||
Log($"[MOVE] L'asta è già in fondo alla lista", LogLevel.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using AutoBidder.Utilities;
|
||||
@@ -21,24 +21,21 @@ namespace AutoBidder
|
||||
GridPauseCommand = new RelayCommand(param => ExecuteGridPause(param as AuctionViewModel));
|
||||
GridStopCommand = new RelayCommand(param => ExecuteGridStop(param as AuctionViewModel));
|
||||
GridBidCommand = new RelayCommand(async param => await ExecuteGridBidAsync(param as AuctionViewModel));
|
||||
|
||||
InitializeCatalogCommands();
|
||||
InitializeProductCommands();
|
||||
}
|
||||
|
||||
private void ExecuteStartAll()
|
||||
{
|
||||
StartButton_Click(null, new RoutedEventArgs());
|
||||
StartButton_Click(null, null);
|
||||
}
|
||||
|
||||
private void ExecuteStopAll()
|
||||
{
|
||||
StopButton_Click(null, new RoutedEventArgs());
|
||||
StopButton_Click(null, null);
|
||||
}
|
||||
|
||||
private void ExecutePauseAll()
|
||||
{
|
||||
PauseAllButton_Click(null, new RoutedEventArgs());
|
||||
PauseAllButton_Click(null, null);
|
||||
}
|
||||
|
||||
private void ExecuteGridStart(AuctionViewModel? vm)
|
||||
@@ -49,7 +46,7 @@ namespace AutoBidder
|
||||
vm.IsActive = true;
|
||||
vm.IsPaused = false;
|
||||
|
||||
// Se il monitoraggio globale non � attivo, avvialo automaticamente
|
||||
// Se il monitoraggio globale non è attivo, avvialo automaticamente
|
||||
if (!_isAutomationActive)
|
||||
{
|
||||
_auctionMonitor.Start();
|
||||
@@ -69,20 +66,9 @@ namespace AutoBidder
|
||||
private void ExecuteGridPause(AuctionViewModel? vm)
|
||||
{
|
||||
if (vm == null) return;
|
||||
|
||||
// Osserva significa "segui ma non puntare": serve comunque un motore acceso,
|
||||
// quindi l'asta va resa attiva anche se partiva da ferma.
|
||||
vm.IsActive = true;
|
||||
vm.IsPaused = true;
|
||||
|
||||
if (!_isAutomationActive)
|
||||
{
|
||||
_auctionMonitor.Start();
|
||||
_isAutomationActive = true;
|
||||
}
|
||||
|
||||
Log($"[OSSERVA] Asta seguita senza puntare: {vm.Name}", LogLevel.Info);
|
||||
|
||||
Log($"[PAUSA] Asta in pausa: {vm.Name}", LogLevel.Info);
|
||||
|
||||
// ? Salva gli stati aggiornati su disco
|
||||
SaveAuctions();
|
||||
UpdateGlobalControlButtons();
|
||||
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
namespace AutoBidder
|
||||
{
|
||||
/// <summary>
|
||||
/// Event handlers per il nuovo sistema di connessione automatica
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Handler per il click sul nome utente nella sidebar
|
||||
/// </summary>
|
||||
private void SidebarUsername_Click(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
// Riusa la stessa logica del pulsante connessione (se fosse ancora presente)
|
||||
ConnectionStatusButton_Click(sender, new RoutedEventArgs());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handler per il pulsante stato connessione nel banner
|
||||
/// Se non connesso: apre tab Browser per login
|
||||
/// Se connesso: mostra opzioni (disconnetti, riconnetti)
|
||||
/// </summary>
|
||||
private void ConnectionStatusButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = _sessionService?.GetCurrentSession();
|
||||
|
||||
if (session != null && !string.IsNullOrEmpty(session.Username))
|
||||
{
|
||||
// Già connesso - Mostra opzioni
|
||||
var result = MessageBox.Show(
|
||||
this,
|
||||
$"Connesso come: {session.Username}\n" +
|
||||
$"Puntate residue: {session.RemainingBids}\n" +
|
||||
$"Credito Shop: EUR {session.ShopCredit:F2}\n\n" +
|
||||
"Vuoi disconnettere e accedere con un altro account?",
|
||||
"Gestione Connessione",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
|
||||
if (result == MessageBoxResult.Yes)
|
||||
{
|
||||
// Disconnetti
|
||||
DisconnectSession();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Non connesso - Apri browser per login
|
||||
MessageBox.Show(
|
||||
this,
|
||||
"Per accedere:\n\n" +
|
||||
"1. Fai login su Bidoo nella scheda Browser\n" +
|
||||
"2. La connessione sarà automatica\n\n" +
|
||||
"Apertura scheda Browser...",
|
||||
"Accedi a Bidoo",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Information);
|
||||
|
||||
// Apri tab Browser
|
||||
TabBrowser.IsChecked = true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Gestione connessione: {ex.Message}", Utilities.LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnette la sessione corrente
|
||||
/// </summary>
|
||||
private void DisconnectSession()
|
||||
{
|
||||
try
|
||||
{
|
||||
Log("[SESSION] Disconnessione in corso...", Utilities.LogLevel.Info);
|
||||
|
||||
// Clear session tramite SessionService
|
||||
_sessionService?.ClearSession();
|
||||
|
||||
// Aggiorna UI
|
||||
SetUserBanner(string.Empty, 0);
|
||||
|
||||
// Ferma monitoraggio se attivo
|
||||
if (_isAutomationActive)
|
||||
{
|
||||
_auctionMonitor?.Stop();
|
||||
_isAutomationActive = false;
|
||||
UpdateGlobalControlButtons();
|
||||
}
|
||||
|
||||
Log("[SESSION] Disconnesso con successo", Utilities.LogLevel.Success);
|
||||
|
||||
MessageBox.Show(
|
||||
this,
|
||||
"Disconnesso con successo.\n\n" +
|
||||
"Per riconnetterti, fai login nella scheda Browser.",
|
||||
"Disconnesso",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Disconnessione: {ex.Message}", Utilities.LogLevel.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ namespace AutoBidder
|
||||
public partial class MainWindow
|
||||
{
|
||||
// ===== TAB NAVIGATION =====
|
||||
|
||||
|
||||
private void TabAsteAttive_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ShowPanel(AuctionMonitor);
|
||||
@@ -17,38 +17,16 @@ namespace AutoBidder
|
||||
private void TabBrowser_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ShowPanel(Browser);
|
||||
Browser.ShowBrowser();
|
||||
}
|
||||
|
||||
private async void TabCerca_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ShowPanel(Browser);
|
||||
Browser.ShowCatalog();
|
||||
await EnsureCatalogLoadedAsync();
|
||||
}
|
||||
|
||||
private void TabProdotti_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ShowPanel(Products);
|
||||
LoadProducts();
|
||||
}
|
||||
|
||||
private void TabPuntateGratis_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ShowPanel(FreeBids);
|
||||
RefreshFreeBidsPanel();
|
||||
ShowPanel(PuntateGratisPanel);
|
||||
}
|
||||
|
||||
private void TabDatiStatistici_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ShowPanel(StatisticsPanel);
|
||||
LoadStatistics();
|
||||
}
|
||||
|
||||
private void TabApprendimento_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ShowPanel(Learning);
|
||||
Learning.Refresh();
|
||||
}
|
||||
|
||||
private void TabImpostazioni_Checked(object sender, RoutedEventArgs e)
|
||||
@@ -57,12 +35,11 @@ namespace AutoBidder
|
||||
{
|
||||
// Mostra il pannello Impostazioni
|
||||
ShowPanel(Settings);
|
||||
|
||||
|
||||
// Carica impostazioni quando si apre la tab
|
||||
LoadDefaultSettings();
|
||||
|
||||
// Aggiorna il riquadro di stato della sezione Sessione
|
||||
RefreshSettingsSessionStatus();
|
||||
|
||||
// NOTA: Caricamento cookie RIMOSSO - ora automatico tramite browser
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
@@ -70,19 +47,15 @@ namespace AutoBidder
|
||||
private void ShowPanel(System.Windows.UIElement? panelToShow)
|
||||
{
|
||||
// Prevent NullReferenceException during initialization
|
||||
if (AuctionMonitor == null || Browser == null || StatisticsPanel == null ||
|
||||
Settings == null || FreeBids == null || Products == null ||
|
||||
Learning == null)
|
||||
if (AuctionMonitor == null || Browser == null || StatisticsPanel == null || Settings == null || PuntateGratisPanel == null)
|
||||
return;
|
||||
|
||||
// Hide all panels
|
||||
AuctionMonitor.Visibility = Visibility.Collapsed;
|
||||
Browser.Visibility = Visibility.Collapsed;
|
||||
Products.Visibility = Visibility.Collapsed;
|
||||
FreeBids.Visibility = Visibility.Collapsed;
|
||||
PuntateGratisPanel.Visibility = Visibility.Collapsed;
|
||||
StatisticsPanel.Visibility = Visibility.Collapsed;
|
||||
Settings.Visibility = Visibility.Collapsed;
|
||||
Learning.Visibility = Visibility.Collapsed;
|
||||
|
||||
// Show selected panel
|
||||
if (panelToShow != null)
|
||||
@@ -90,7 +63,7 @@ namespace AutoBidder
|
||||
}
|
||||
|
||||
// ===== AUCTION MONITOR CONTROL EVENTS =====
|
||||
|
||||
|
||||
private void AuctionMonitor_StartClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
StartButton_Click(sender, e);
|
||||
@@ -106,6 +79,29 @@ namespace AutoBidder
|
||||
StopButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void AuctionMonitor_ExportClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Chiama il metodo di export esistente
|
||||
try
|
||||
{
|
||||
// Esporta tutte le aste monitorate
|
||||
var auctions = _auctionMonitor.GetAuctions();
|
||||
if (auctions.Count == 0)
|
||||
{
|
||||
System.Windows.MessageBox.Show("Nessuna asta da esportare", "Export", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Implementare dialog export con scelta formato
|
||||
System.Windows.MessageBox.Show($"Export di {auctions.Count} aste.\n\nFunzionalità in sviluppo.\nUsa le impostazioni nella scheda Impostazioni per configurare l'export.", "Export Aste", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
|
||||
Log($"[INFO] Richiesto export di {auctions.Count} aste (funzionalità in sviluppo)", Utilities.LogLevel.Info);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Export: {ex.Message}", Utilities.LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void AuctionMonitor_AddUrlClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
AddUrlButton_Click(sender, e);
|
||||
@@ -115,7 +111,7 @@ namespace AutoBidder
|
||||
{
|
||||
RemoveUrlButton_Click(sender, e);
|
||||
}
|
||||
|
||||
|
||||
private void AuctionMonitor_RemoveAllClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RemoveAllButton_Click(sender, e);
|
||||
@@ -137,22 +133,22 @@ namespace AutoBidder
|
||||
{
|
||||
_selectedAuction = selected;
|
||||
UpdateSelectedAuctionDetails(selected);
|
||||
|
||||
|
||||
// ? NUOVO: Rileva nome generico O info prodotto mancanti e recupera automaticamente
|
||||
var auction = selected.AuctionInfo;
|
||||
bool hasGenericName = auction.Name.StartsWith("Asta ") &&
|
||||
!auction.Name.Contains("Shop") &&
|
||||
!auction.Name.Contains("�") &&
|
||||
bool hasGenericName = auction.Name.StartsWith("Asta ") &&
|
||||
!auction.Name.Contains("Shop") &&
|
||||
!auction.Name.Contains("€") &&
|
||||
!auction.Name.Contains("Buono") &&
|
||||
!auction.Name.Contains("Carburante");
|
||||
|
||||
|
||||
bool needsProductInfo = !auction.BuyNowPrice.HasValue && !auction.ShippingCost.HasValue;
|
||||
|
||||
|
||||
// Se ha nome generico O mancano info prodotto ? recupera in background
|
||||
if (hasGenericName || needsProductInfo)
|
||||
{
|
||||
Log($"[AUTO-FETCH] Recupero automatico per: {auction.Name} (nome generico={hasGenericName}, info mancanti={needsProductInfo})", Utilities.LogLevel.Info);
|
||||
|
||||
|
||||
// Avvia fetch in background senza bloccare UI
|
||||
_ = LoadProductInfoInBackgroundAsync(auction);
|
||||
}
|
||||
@@ -163,16 +159,21 @@ namespace AutoBidder
|
||||
{
|
||||
CopyAuctionUrlButton_Click(sender, e);
|
||||
}
|
||||
|
||||
|
||||
private void AuctionMonitor_OpenAuctionInternalClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenAuctionInternalButton_Click(sender, e);
|
||||
}
|
||||
|
||||
|
||||
private void AuctionMonitor_OpenAuctionExternalClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenAuctionExternalButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void AuctionMonitor_ExportAuctionClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ExportAuctionButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void AuctionMonitor_ResetSettingsClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -195,39 +196,50 @@ namespace AutoBidder
|
||||
}
|
||||
|
||||
// ===== AUCTION SETTINGS EVENTS =====
|
||||
|
||||
|
||||
private void AuctionMonitor_RefreshProductInfoClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RefreshProductInfoButton_Click(sender, e);
|
||||
}
|
||||
|
||||
|
||||
private void AuctionMonitor_ConnectionStatusClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ConnectionStatusButton_Click(sender, e);
|
||||
}
|
||||
|
||||
|
||||
private void AuctionMonitor_BidBeforeDeadlineMsChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Riempire i campi alla selezione di un'asta scatena i TextChanged:
|
||||
// senza questa guardia ogni selezione riscriveva auctions.json quattro volte
|
||||
// con gli stessi valori appena letti.
|
||||
if (_isUpdatingSelection) return;
|
||||
|
||||
// Gestito internamente dal binding WPF
|
||||
if (_selectedAuction != null && int.TryParse(AuctionMonitor.SelectedBidBeforeDeadlineMs.Text, out int ms))
|
||||
{
|
||||
_selectedAuction.AuctionInfo.BidBeforeDeadlineMs = ms;
|
||||
_selectedAuction.AuctionInfo.BidLeadIsManual = true;
|
||||
SaveAuctions();
|
||||
}
|
||||
}
|
||||
|
||||
private void AuctionMonitor_CheckAuctionOpenChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Gestito internamente dal binding WPF
|
||||
if (_selectedAuction != null)
|
||||
{
|
||||
_selectedAuction.AuctionInfo.CheckAuctionOpenBeforeBid = AuctionMonitor.SelectedCheckAuctionOpen.IsChecked ?? false;
|
||||
SaveAuctions();
|
||||
}
|
||||
}
|
||||
|
||||
private void AuctionMonitor_MinPriceChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Gestito internamente dal binding WPF
|
||||
if (_selectedAuction != null && double.TryParse(AuctionMonitor.SelectedMinPrice.Text, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out double price))
|
||||
{
|
||||
_selectedAuction.MinPrice = price;
|
||||
SaveAuctions();
|
||||
}
|
||||
}
|
||||
|
||||
private void AuctionMonitor_MaxPriceChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Riempire i campi alla selezione di un'asta scatena i TextChanged:
|
||||
// senza questa guardia ogni selezione riscriveva auctions.json quattro volte
|
||||
// con gli stessi valori appena letti.
|
||||
if (_isUpdatingSelection) return;
|
||||
|
||||
// Gestito internamente dal binding WPF
|
||||
if (_selectedAuction != null && double.TryParse(AuctionMonitor.SelectedMaxPrice.Text, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out double price))
|
||||
{
|
||||
_selectedAuction.MaxPrice = price;
|
||||
@@ -237,11 +249,7 @@ namespace AutoBidder
|
||||
|
||||
private void AuctionMonitor_MaxClicksChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Riempire i campi alla selezione di un'asta scatena i TextChanged:
|
||||
// senza questa guardia ogni selezione riscriveva auctions.json quattro volte
|
||||
// con gli stessi valori appena letti.
|
||||
if (_isUpdatingSelection) return;
|
||||
|
||||
// Gestito internamente dal binding WPF
|
||||
if (_selectedAuction != null && int.TryParse(AuctionMonitor.SelectedMaxClicks.Text, out int clicks))
|
||||
{
|
||||
_selectedAuction.MaxClicks = clicks;
|
||||
@@ -315,7 +323,7 @@ namespace AutoBidder
|
||||
}
|
||||
|
||||
// ===== SETTINGS CONTROL EVENTS =====
|
||||
|
||||
|
||||
private void Settings_SaveDefaultsClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SaveDefaultsButton_Click(sender, e);
|
||||
@@ -14,41 +14,44 @@ namespace AutoBidder
|
||||
/// Scrive un messaggio nel log globale con filtraggio basato sul livello minimo configurato
|
||||
/// </summary>
|
||||
/// <param name="message">Messaggio da loggare</param>
|
||||
/// <param name="level">Livello di severit� del messaggio</param>
|
||||
/// <param name="level">Livello di severità del messaggio</param>
|
||||
private void Log(string message, LogLevel level = LogLevel.Info)
|
||||
{
|
||||
// Niente simboli né a capo nel registro: una riga, in chiaro.
|
||||
message = LogText.Clean(message);
|
||||
|
||||
// Il file si scrive subito, fuori dal Dispatcher e senza filtro di livello:
|
||||
// il registro serve proprio quando qualcosa è andato storto, e in quel momento
|
||||
// il messaggio utile è spesso uno di quelli che a video sono nascosti. La
|
||||
// scrittura è accodata, quindi non costa nulla al chiamante.
|
||||
TextLogService.App(LevelTag(level), message);
|
||||
|
||||
Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
// Carica impostazioni per ottenere livello minimo e limite righe
|
||||
var settings = SettingsManager.Load();
|
||||
|
||||
|
||||
// Filtra messaggi in base al livello minimo configurato
|
||||
MinimumLogLevel minLevel = MinimumLogLevel.Normal; // Default
|
||||
if (Enum.TryParse<MinimumLogLevel>(settings.MinLogLevel, out var parsedLevel))
|
||||
{
|
||||
minLevel = parsedLevel;
|
||||
}
|
||||
|
||||
// Se il livello del messaggio � maggiore del minimo configurato, ignora
|
||||
|
||||
// Se il livello del messaggio è maggiore del minimo configurato, ignora
|
||||
if ((int)level > (int)minLevel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var timestamp = DateTime.Now.ToString("HH:mm:ss");
|
||||
|
||||
var logEntry = $"[{timestamp}] [{LevelTag(level)}] {message}";
|
||||
|
||||
// Prefisso in base al livello per chiarezza
|
||||
string prefix = level switch
|
||||
{
|
||||
LogLevel.Error => "[ERROR]",
|
||||
LogLevel.Warning => "[WARN]",
|
||||
LogLevel.Info => "[INFO]",
|
||||
LogLevel.Success => "[OK]",
|
||||
LogLevel.Debug => "[DEBUG]",
|
||||
LogLevel.Trace => "[TRACE]",
|
||||
_ => "[LOG]"
|
||||
};
|
||||
|
||||
var logEntry = $"[{timestamp}] {prefix} {message}";
|
||||
|
||||
// Color coding based on severity for dark theme
|
||||
var color = level switch
|
||||
@@ -66,13 +69,13 @@ namespace AutoBidder
|
||||
var r = new System.Windows.Documents.Run(logEntry) { Foreground = color };
|
||||
p.Inlines.Add(r);
|
||||
LogBox.Document.Blocks.Add(p);
|
||||
|
||||
|
||||
// Mantieni solo gli ultimi N paragrafi (configurabile dalle impostazioni)
|
||||
int maxLogLines = settings.MaxGlobalLogLines;
|
||||
|
||||
|
||||
if (LogBox.Document.Blocks.Count > maxLogLines)
|
||||
{
|
||||
// Rimuovi i paragrafi pi� vecchi (primi inseriti)
|
||||
// Rimuovi i paragrafi più vecchi (primi inseriti)
|
||||
int excessCount = LogBox.Document.Blocks.Count - maxLogLines;
|
||||
for (int i = 0; i < excessCount; i++)
|
||||
{
|
||||
@@ -92,20 +95,5 @@ namespace AutoBidder
|
||||
catch { }
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sigla del livello, uguale a video e su file: due formati diversi renderebbero
|
||||
/// impossibile ritrovare nel file la riga che si è vista nella finestra.
|
||||
/// </summary>
|
||||
private static string LevelTag(LogLevel level) => level switch
|
||||
{
|
||||
LogLevel.Error => "ERROR",
|
||||
LogLevel.Warning => "WARN",
|
||||
LogLevel.Info => "INFO",
|
||||
LogLevel.Success => "OK",
|
||||
LogLevel.Debug => "DEBUG",
|
||||
LogLevel.Trace => "TRACE",
|
||||
_ => "LOG"
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -13,54 +13,32 @@ namespace AutoBidder
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
/// <summary>Firma dell'ultimo log disegnato: asta, righe e ultima voce.</summary>
|
||||
private (string Id, int Count, DateTime Last, int Repeat) _lastLogSignature;
|
||||
|
||||
/// <summary>Firma dell'ultima griglia puntatori disegnata.</summary>
|
||||
private (string Id, int Count, int TotalBids) _lastBiddersSignature;
|
||||
|
||||
private void UpdateAuctionLog(AuctionViewModel auction)
|
||||
{
|
||||
try
|
||||
{
|
||||
var auctionInfo = auction.AuctionInfo;
|
||||
var log = auctionInfo.AuctionLog;
|
||||
if (log == null) return;
|
||||
|
||||
// Ricostruire il documento significa creare un Paragraph e un Run per ogni
|
||||
// riga, fino a duecento, a ogni risposta del server. Se il log non è
|
||||
// cambiato non c'è nulla da ridisegnare.
|
||||
var last = log.Count > 0 ? log[^1] : null;
|
||||
var signature = (auction.AuctionId, log.Count,
|
||||
last?.Timestamp ?? DateTime.MinValue, last?.RepeatCount ?? 0);
|
||||
|
||||
if (signature == _lastLogSignature) return;
|
||||
_lastLogSignature = signature;
|
||||
|
||||
var logBox = SelectedAuctionLog;
|
||||
var doc = logBox.Document;
|
||||
doc.Blocks.Clear();
|
||||
|
||||
foreach (var entry in log)
|
||||
|
||||
foreach (var entry in auctionInfo.AuctionLog)
|
||||
{
|
||||
// Color coding based on structured log level
|
||||
Brush color = entry.Level switch
|
||||
{
|
||||
Models.AuctionLogLevel.Error => new SolidColorBrush(Color.FromRgb(232, 17, 35)), // Red
|
||||
Models.AuctionLogLevel.Warning => new SolidColorBrush(Color.FromRgb(255, 183, 0)), // Yellow/Orange
|
||||
Models.AuctionLogLevel.Success => new SolidColorBrush(Color.FromRgb(0, 216, 0)), // Green
|
||||
Models.AuctionLogLevel.Bid => new SolidColorBrush(Color.FromRgb(0, 216, 0)), // Green
|
||||
Models.AuctionLogLevel.Strategy => new SolidColorBrush(Color.FromRgb(200, 160, 255)),// Purple
|
||||
Models.AuctionLogLevel.Timing => new SolidColorBrush(Color.FromRgb(150, 150, 150)), // Gray
|
||||
Models.AuctionLogLevel.Debug => new SolidColorBrush(Color.FromRgb(120, 120, 120)), // Dark gray
|
||||
_ => new SolidColorBrush(Color.FromRgb(100, 180, 255)) // Light Blue
|
||||
};
|
||||
|
||||
var repeatSuffix = entry.RepeatCount > 1 ? $" (x{entry.RepeatCount})" : "";
|
||||
var line = $"[{entry.TimeDisplay}] [{entry.LevelLabel}] {entry.Message}{repeatSuffix}";
|
||||
var upper = entry.ToUpperInvariant();
|
||||
|
||||
// Color coding based on log content
|
||||
Brush color;
|
||||
if (upper.Contains("[ERRORE]") || upper.Contains("[FAIL]") || upper.Contains("EXCEPTION"))
|
||||
color = new SolidColorBrush(Color.FromRgb(232, 17, 35)); // Red
|
||||
else if (upper.Contains("[WARN]") || upper.Contains("ATTENZIONE"))
|
||||
color = new SolidColorBrush(Color.FromRgb(255, 183, 0)); // Yellow/Orange
|
||||
else if (upper.Contains("[OK]") || upper.Contains("SUCCESS"))
|
||||
color = new SolidColorBrush(Color.FromRgb(0, 216, 0)); // Green
|
||||
else
|
||||
color = new SolidColorBrush(Color.FromRgb(100, 180, 255)); // Light Blue - #64B4FF (più chiaro e leggibile)
|
||||
|
||||
var p = new System.Windows.Documents.Paragraph { Margin = new Thickness(0, 2, 0, 2) };
|
||||
var r = new System.Windows.Documents.Run(line) { Foreground = color };
|
||||
var r = new System.Windows.Documents.Run(entry) { Foreground = color };
|
||||
p.Inlines.Add(r);
|
||||
doc.Blocks.Add(p);
|
||||
}
|
||||
@@ -81,39 +59,23 @@ namespace AutoBidder
|
||||
{
|
||||
try
|
||||
{
|
||||
// Copia sotto lucchetto: il motore riscrive il dizionario dal proprio thread.
|
||||
var bidders = auction.AuctionInfo.SnapshotBidderStats();
|
||||
|
||||
// La quota si calcola qui: il singolo puntatore non conosce il totale dell'asta.
|
||||
var totalBids = bidders.Sum(b => b.BidCount);
|
||||
foreach (var bidder in bidders)
|
||||
{
|
||||
bidder.SharePercent = totalBids > 0 ? bidder.BidCount * 100.0 / totalBids : 0;
|
||||
}
|
||||
|
||||
// Riassegnare ItemsSource ricostruisce l'intera griglia e la fa lampeggiare:
|
||||
// si rifà solo quando i numeri sono davvero cambiati.
|
||||
var signature = (auction.AuctionId, bidders.Count, totalBids);
|
||||
if (signature != _lastBiddersSignature)
|
||||
{
|
||||
_lastBiddersSignature = signature;
|
||||
|
||||
SelectedAuctionBiddersGrid.ItemsSource = null;
|
||||
SelectedAuctionBiddersGrid.ItemsSource = bidders;
|
||||
SelectedAuctionBiddersCount.Text = bidders.Count == 0
|
||||
? "Nessun dato sui puntatori."
|
||||
: $"{bidders.Count} puntatori · {totalBids} puntate osservate";
|
||||
}
|
||||
var bidders = auction.AuctionInfo.BidderStats.Values
|
||||
.OrderByDescending(b => b.BidCount)
|
||||
.ToList();
|
||||
|
||||
SelectedAuctionBiddersGrid.ItemsSource = null;
|
||||
SelectedAuctionBiddersGrid.ItemsSource = bidders;
|
||||
SelectedAuctionBiddersCount.Text = $"Utenti: {bidders?.Count ?? 0}";
|
||||
|
||||
// ?? NUOVO: Aggiorna il contatore della storia puntate con limite configurato
|
||||
var settings = SettingsManager.Load();
|
||||
var maxEntries = settings?.MaxBidHistoryEntries ?? 20;
|
||||
var historyCount = auction.BidHistoryEntries?.Count ?? 0;
|
||||
|
||||
|
||||
var bidHistoryCountTextBlock = AuctionMonitor.FindName("BidHistoryCount") as TextBlock;
|
||||
if (bidHistoryCountTextBlock != null)
|
||||
{
|
||||
// Mostra "Ultime 20 puntate" se il limite � attivo
|
||||
// Mostra "Ultime 20 puntate" se il limite è attivo
|
||||
if (maxEntries > 0)
|
||||
{
|
||||
bidHistoryCountTextBlock.Text = $"Ultime {maxEntries} puntate";
|
||||
@@ -136,6 +98,8 @@ namespace AutoBidder
|
||||
|
||||
SelectedAuctionName.Text = auction.Name;
|
||||
SelectedBidBeforeDeadlineMs.Text = auction.AuctionInfo.BidBeforeDeadlineMs.ToString();
|
||||
SelectedCheckAuctionOpen.IsChecked = auction.AuctionInfo.CheckAuctionOpenBeforeBid;
|
||||
SelectedMinPrice.Text = auction.MinPrice.ToString("F2", System.Globalization.CultureInfo.InvariantCulture);
|
||||
SelectedMaxPrice.Text = auction.MaxPrice.ToString("F2", System.Globalization.CultureInfo.InvariantCulture);
|
||||
SelectedMaxClicks.Text = auction.MaxClicks.ToString();
|
||||
|
||||
@@ -153,8 +117,8 @@ namespace AutoBidder
|
||||
|
||||
_isUpdatingSelection = false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
catch
|
||||
{
|
||||
_isUpdatingSelection = false;
|
||||
}
|
||||
}
|
||||
@@ -187,17 +151,18 @@ namespace AutoBidder
|
||||
int canPauseCount = _auctionViewModels.Count(a => a.CanPause);
|
||||
int canStopCount = _auctionViewModels.Count(a => a.CanStop);
|
||||
|
||||
// AVVIA TUTTI: abilitato se ALMENO UNA asta pu� essere avviata
|
||||
// Scuro se NESSUNA asta pu� essere avviata (tutte gi� avviate)
|
||||
// AVVIA TUTTI: abilitato se ALMENO UNA asta può essere avviata
|
||||
// Scuro se NESSUNA asta può essere avviata (tutte già avviate)
|
||||
StartButton.IsEnabled = canStartCount > 0;
|
||||
StartButton.Opacity = canStartCount > 0 ? 1.0 : 0.4;
|
||||
|
||||
// OSSERVA TUTTE: abilitato se ALMENO UNA asta non e' gia' in sola osservazione
|
||||
// PAUSA TUTTI: abilitato se ALMENO UNA asta può essere messa in pausa
|
||||
// Scuro se NESSUNA asta può essere messa in pausa (tutte già in pausa o ferme)
|
||||
PauseAllButton.IsEnabled = canPauseCount > 0;
|
||||
PauseAllButton.Opacity = canPauseCount > 0 ? 1.0 : 0.4;
|
||||
|
||||
// FERMA TUTTI: abilitato se ALMENO UNA asta pu� essere fermata
|
||||
// Scuro se NESSUNA asta pu� essere fermata (tutte gi� ferme)
|
||||
// FERMA TUTTI: abilitato se ALMENO UNA asta può essere fermata
|
||||
// Scuro se NESSUNA asta può essere fermata (tutte già ferme)
|
||||
StopButton.IsEnabled = canStopCount > 0;
|
||||
StopButton.Opacity = canStopCount > 0 ? 1.0 : 0.4;
|
||||
}
|
||||
@@ -250,7 +215,7 @@ namespace AutoBidder
|
||||
Log($"[ERRORE] Esportazione asta: {ex.Message}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Resetta le impostazioni dell'asta selezionata ai valori predefiniti
|
||||
/// </summary>
|
||||
@@ -265,19 +230,20 @@ namespace AutoBidder
|
||||
}
|
||||
|
||||
var settings = SettingsManager.Load();
|
||||
|
||||
|
||||
// Resetta ai valori predefiniti dalle impostazioni
|
||||
_selectedAuction.AuctionInfo.BidBeforeDeadlineMs = settings.DefaultBidBeforeDeadlineMs;
|
||||
_selectedAuction.AuctionInfo.BidLeadIsManual = false; // torna all'anticipo adattivo
|
||||
_selectedAuction.AuctionInfo.CheckAuctionOpenBeforeBid = settings.DefaultCheckAuctionOpenBeforeBid;
|
||||
_selectedAuction.MinPrice = settings.DefaultMinPrice;
|
||||
_selectedAuction.MaxPrice = settings.DefaultMaxPrice;
|
||||
_selectedAuction.MaxClicks = settings.DefaultMaxClicks;
|
||||
|
||||
|
||||
// Aggiorna UI
|
||||
UpdateAuctionSettingsDisplay(_selectedAuction);
|
||||
|
||||
|
||||
// Salva
|
||||
SaveAuctions();
|
||||
|
||||
|
||||
Log($"[RESET] Impostazioni ripristinate ai valori predefiniti per: {_selectedAuction.Name}", LogLevel.Info);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -286,7 +252,7 @@ namespace AutoBidder
|
||||
MessageBox.Show($"Errore durante il reset: {ex.Message}", "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Pulisce la lista degli utenti che hanno puntato sull'asta selezionata
|
||||
/// </summary>
|
||||
@@ -301,7 +267,7 @@ namespace AutoBidder
|
||||
}
|
||||
|
||||
var result = MessageBox.Show(
|
||||
$"Pulire la lista degli utenti per questa asta?\n\n{_selectedAuction.Name}\n\nLa lista degli utenti che hanno puntato verr� svuotata.",
|
||||
$"Pulire la lista degli utenti per questa asta?\n\n{_selectedAuction.Name}\n\nLa lista degli utenti che hanno puntato verrà svuotata.",
|
||||
"Conferma Pulizia",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
@@ -311,10 +277,10 @@ namespace AutoBidder
|
||||
|
||||
// Pulisci la lista bidders
|
||||
_selectedAuction.AuctionInfo.BidderStats.Clear();
|
||||
|
||||
|
||||
// Aggiorna UI
|
||||
RefreshBiddersGrid(_selectedAuction);
|
||||
|
||||
|
||||
Log($"[CLEAR] Lista utenti pulita per: {_selectedAuction.Name}", LogLevel.Info);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -323,7 +289,7 @@ namespace AutoBidder
|
||||
MessageBox.Show($"Errore durante la pulizia: {ex.Message}", "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Pulisce il log dell'asta selezionata
|
||||
/// </summary>
|
||||
@@ -339,10 +305,10 @@ namespace AutoBidder
|
||||
|
||||
// Pulisci il log dell'asta
|
||||
_selectedAuction.AuctionInfo.AuctionLog.Clear();
|
||||
|
||||
|
||||
// Aggiorna UI
|
||||
UpdateAuctionLog(_selectedAuction);
|
||||
|
||||
|
||||
Log($"[CLEAR] Log pulito per: {_selectedAuction.Name}", LogLevel.Info);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -0,0 +1,338 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using AutoBidder.Services;
|
||||
using AutoBidder.Utilities;
|
||||
|
||||
namespace AutoBidder
|
||||
{
|
||||
/// <summary>
|
||||
/// User info and banner management - REFACTORED con SessionService
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
private System.Windows.Threading.DispatcherTimer _userBannerTimer;
|
||||
private System.Windows.Threading.DispatcherTimer _userHtmlTimer;
|
||||
private SessionService _sessionService; // NUOVO: Servizio centralizzato
|
||||
|
||||
private void InitializeUserInfoTimers()
|
||||
{
|
||||
// Timer per aggiornamento dati utente da HTML ogni 5 minuti (PRINCIPALE)
|
||||
_userHtmlTimer = new System.Windows.Threading.DispatcherTimer();
|
||||
_userHtmlTimer.Interval = TimeSpan.FromMinutes(5);
|
||||
_userHtmlTimer.Tick += UserHtmlTimer_Tick;
|
||||
_userHtmlTimer.Start();
|
||||
|
||||
// Timer per aggiornamento banner API ogni 10 minuti (SECONDARIO - fallback)
|
||||
_userBannerTimer = new System.Windows.Threading.DispatcherTimer();
|
||||
_userBannerTimer.Interval = TimeSpan.FromMinutes(10);
|
||||
_userBannerTimer.Tick += UserBannerTimer_Tick;
|
||||
_userBannerTimer.Start();
|
||||
}
|
||||
|
||||
private void InitializeSessionService()
|
||||
{
|
||||
// NUOVO: Inizializza SessionService
|
||||
_sessionService = new SessionService(_auctionMonitor.GetApiClient());
|
||||
|
||||
// Event handlers
|
||||
_sessionService.OnLog += (msg) => Log(msg, LogLevel.Info);
|
||||
_sessionService.OnSessionChanged += (session) =>
|
||||
{
|
||||
Dispatcher.Invoke(() => SetUserBanner(session.Username, session.RemainingBids));
|
||||
};
|
||||
}
|
||||
|
||||
private void SetUserBanner(string username, int? remainingBids)
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = _sessionService?.GetCurrentSession();
|
||||
|
||||
if (!string.IsNullOrEmpty(username))
|
||||
{
|
||||
// === CONNESSO ===
|
||||
|
||||
// Header - Puntate + Credito
|
||||
RemainingBidsText.Text = remainingBids?.ToString() ?? "0";
|
||||
|
||||
if (session?.ShopCredit > 0)
|
||||
{
|
||||
AuctionMonitor.ShopCreditText.Text = $"EUR {session.ShopCredit:F2}";
|
||||
}
|
||||
else
|
||||
{
|
||||
AuctionMonitor.ShopCreditText.Text = "EUR 0.00";
|
||||
}
|
||||
|
||||
// Aste vinte
|
||||
BannerAsteDaRiscattare.Text = "0";
|
||||
|
||||
// Indicatore limite puntate
|
||||
var settings = Utilities.SettingsManager.Load();
|
||||
UpdateMinBidsIndicator(settings.MinimumRemainingBids);
|
||||
|
||||
// === SIDEBAR - Mostra dati utente ===
|
||||
SidebarUsernameText.Text = username;
|
||||
SidebarUsernameText.Foreground = new System.Windows.Media.SolidColorBrush(
|
||||
System.Windows.Media.Color.FromRgb(0, 216, 0)); // Verde
|
||||
SidebarUsernameText.FontWeight = System.Windows.FontWeights.Bold;
|
||||
SidebarUsernameText.ToolTip = $"Connesso come {username} - Click per disconnettere";
|
||||
|
||||
// Mostra dettagli (ID + Email)
|
||||
if (session?.UserId > 0)
|
||||
{
|
||||
SidebarUserIdText.Text = $"ID: {session.UserId}";
|
||||
SidebarUserIdText.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
SidebarUserIdText.Visibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(session?.Email))
|
||||
{
|
||||
SidebarUserEmailText.Text = session.Email;
|
||||
SidebarUserEmailText.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
SidebarUserEmailText.Visibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
SidebarUserDetailsPanel.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
// === NON CONNESSO ===
|
||||
|
||||
// Reset header
|
||||
RemainingBidsText.Text = "0";
|
||||
AuctionMonitor.ShopCreditText.Text = "EUR 0.00";
|
||||
BannerAsteDaRiscattare.Text = "0";
|
||||
|
||||
// Nascondi indicatore limite
|
||||
MinBidsLimitIndicator.Visibility = Visibility.Collapsed;
|
||||
|
||||
// === SIDEBAR - Mostra "Non connesso" ===
|
||||
SidebarUsernameText.Text = "Non connesso";
|
||||
SidebarUsernameText.Foreground = new System.Windows.Media.SolidColorBrush(
|
||||
System.Windows.Media.Color.FromRgb(255, 82, 82)); // Rosso chiaro (#FF5252)
|
||||
SidebarUsernameText.FontWeight = System.Windows.FontWeights.Bold;
|
||||
SidebarUsernameText.ToolTip = "Non connesso - Click per accedere tramite browser";
|
||||
|
||||
// Nascondi dettagli (ID + Email)
|
||||
SidebarUserDetailsPanel.Visibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private async void UserBannerTimer_Tick(object? sender, EventArgs e)
|
||||
{
|
||||
// Usa SessionService per refresh
|
||||
if (_sessionService != null)
|
||||
{
|
||||
await _sessionService.RefreshUserInfoAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private async void UserHtmlTimer_Tick(object? sender, EventArgs e)
|
||||
{
|
||||
// Usa SessionService per refresh
|
||||
if (_sessionService != null)
|
||||
{
|
||||
await _sessionService.RefreshUserInfoAsync();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Carica sessione salvata
|
||||
/// </summary>
|
||||
private void LoadSavedSession()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = _sessionService?.GetCurrentSession();
|
||||
|
||||
if (session != null && session.IsValid)
|
||||
{
|
||||
StartButton.IsEnabled = true;
|
||||
|
||||
Log($"[SESSION] Ripristino sessione per: {session.Username}", LogLevel.Info);
|
||||
|
||||
// Aggiorna UI con stato connesso (ottimistico)
|
||||
SetUserBanner(session.Username, session.RemainingBids);
|
||||
|
||||
// Verifica validità cookie in background
|
||||
System.Threading.Tasks.Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Log("[SESSION] Verifica validità sessione...", LogLevel.Info);
|
||||
var success = await _auctionMonitor.UpdateUserInfoAsync();
|
||||
var updatedSession = _auctionMonitor.GetSession();
|
||||
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (success && updatedSession != null && !string.IsNullOrEmpty(updatedSession.Username))
|
||||
{
|
||||
SetUserBanner(updatedSession.Username, updatedSession.RemainingBids);
|
||||
Log($"[SESSION] Sessione valida - {updatedSession.Username} ({updatedSession.RemainingBids} puntate)", LogLevel.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetUserBanner(string.Empty, 0);
|
||||
Log("[SESSION] Sessione scaduta", LogLevel.Warning);
|
||||
CheckBrowserCookieAfterWebViewReady();
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
SetUserBanner(string.Empty, 0);
|
||||
Log($"[SESSION] Errore verifica sessione: {ex.Message}", LogLevel.Warning);
|
||||
CheckBrowserCookieAfterWebViewReady();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[SESSION] Nessuna sessione salvata", LogLevel.Info);
|
||||
CheckBrowserCookieAfterWebViewReady();
|
||||
SetUserBanner(string.Empty, 0);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Caricamento sessione: {ex.Message}", LogLevel.Error);
|
||||
CheckBrowserCookieAfterWebViewReady();
|
||||
SetUserBanner(string.Empty, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attende che WebView sia pronta, poi verifica presenza cookie
|
||||
/// </summary>
|
||||
private void CheckBrowserCookieAfterWebViewReady()
|
||||
{
|
||||
System.Threading.Tasks.Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
// Aspetta che WebView sia inizializzata (max 60 secondi)
|
||||
var webViewReady = await WaitForWebViewInitAsync(60);
|
||||
|
||||
if (!webViewReady)
|
||||
{
|
||||
await Dispatcher.InvokeAsync(() =>
|
||||
{
|
||||
Log("[WARN] WebView non inizializzata dopo 60 secondi", LogLevel.Warning);
|
||||
Log("[INFO] Per accedere:", LogLevel.Info);
|
||||
Log("[INFO] 1. Click su 'Non connesso' nella sidebar", LogLevel.Info);
|
||||
Log("[INFO] 2. Si aprirà la scheda Browser", LogLevel.Info);
|
||||
Log("[INFO] 3. Fai login su Bidoo", LogLevel.Info);
|
||||
Log("[INFO] 4. La connessione sarà automatica", LogLevel.Info);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// WebView pronta - verifica cookie
|
||||
await Dispatcher.InvokeAsync(async () =>
|
||||
{
|
||||
var browserCookie = await GetCookieFromWebView();
|
||||
|
||||
if (string.IsNullOrEmpty(browserCookie))
|
||||
{
|
||||
Log("[INFO] Nessun cookie nel browser", LogLevel.Info);
|
||||
Log("[INFO] Per accedere:", LogLevel.Info);
|
||||
Log("[INFO] 1. Click su 'Non connesso' nella sidebar", LogLevel.Info);
|
||||
Log("[INFO] 2. Si aprirà la scheda Browser", LogLevel.Info);
|
||||
Log("[INFO] 3. Fai login su Bidoo", LogLevel.Info);
|
||||
Log("[INFO] 4. La connessione sarà automatica", LogLevel.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[INFO] Cookie rilevato nel browser - importazione in corso...", LogLevel.Info);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[WARN] Errore verifica cookie: {ex.Message}", LogLevel.Warning);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorna immediatamente il banner delle puntate residue (chiamato dopo ogni puntata)
|
||||
/// </summary>
|
||||
public void UpdateRemainingBidsDisplay()
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = _sessionService?.GetCurrentSession();
|
||||
if (session != null && session.RemainingBids > 0)
|
||||
{
|
||||
RemainingBidsText.Text = session.RemainingBids.ToString();
|
||||
Log($"[BANNER UPDATE] Puntate residue aggiornate: {session.RemainingBids}", LogLevel.Info);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERROR] Errore aggiornamento banner: {ex.Message}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ? Aggiorna l'indicatore del limite minimo puntate nel banner
|
||||
/// </summary>
|
||||
private void UpdateMinBidsIndicator(int minBidsLimit)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (minBidsLimit > 0)
|
||||
{
|
||||
// Mostra indicatore con solo il numero tra parentesi
|
||||
MinBidsLimitIndicator.Visibility = Visibility.Visible;
|
||||
MinBidsLimitIndicator.Text = $"({minBidsLimit})";
|
||||
MinBidsLimitIndicator.ToolTip = $"Limite minimo puntate attivo: non scendera sotto {minBidsLimit} puntate";
|
||||
|
||||
// Colore basato su puntate residue
|
||||
var session = _sessionService?.GetCurrentSession();
|
||||
if (session != null && session.RemainingBids > 0)
|
||||
{
|
||||
if (session.RemainingBids <= minBidsLimit)
|
||||
{
|
||||
// Al limite - Rosso chiaro (più visibile su sfondo scuro)
|
||||
MinBidsLimitIndicator.Foreground = new System.Windows.Media.SolidColorBrush(
|
||||
System.Windows.Media.Color.FromRgb(255, 82, 82)); // #FF5252 - Rosso chiaro
|
||||
}
|
||||
else if (session.RemainingBids <= minBidsLimit + 10)
|
||||
{
|
||||
// Vicino al limite - Giallo
|
||||
MinBidsLimitIndicator.Foreground = new System.Windows.Media.SolidColorBrush(
|
||||
System.Windows.Media.Color.FromRgb(255, 193, 7)); // #FFC107 - Giallo
|
||||
}
|
||||
else
|
||||
{
|
||||
// Sopra il limite - Verde
|
||||
MinBidsLimitIndicator.Foreground = new System.Windows.Media.SolidColorBrush(
|
||||
System.Windows.Media.Color.FromRgb(0, 216, 0)); // #00D800 - Verde
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nascondi indicatore
|
||||
MinBidsLimitIndicator.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace AutoBidder
|
||||
{
|
||||
private bool _isWebViewInitialized = false;
|
||||
private TaskCompletionSource<bool>? _webViewInitCompletionSource;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Inizializza WebView2 in background all'avvio per pre-caricare il browser
|
||||
/// </summary>
|
||||
@@ -28,23 +28,21 @@ namespace AutoBidder
|
||||
_webViewInitCompletionSource?.TrySetResult(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Log("[BROWSER] Inizializzazione WebView2 in background...", LogLevel.Info);
|
||||
|
||||
|
||||
// Aspetta un attimo che l'UI sia completamente caricata
|
||||
await System.Threading.Tasks.Task.Delay(500);
|
||||
|
||||
|
||||
// ? FIX: WebView2 si inizializza SOLO se visibile
|
||||
// Salva tab corrente e switcha temporaneamente a Browser
|
||||
var wasVisible = Browser.Visibility == Visibility.Visible;
|
||||
var currentTab = TabAsteAttive.IsChecked == true ? "AsteAttive" :
|
||||
TabCerca.IsChecked == true ? "Cerca" :
|
||||
TabProdotti.IsChecked == true ? "Prodotti" :
|
||||
TabBrowser.IsChecked == true ? "Browser" :
|
||||
TabPuntateGratis.IsChecked == true ? "PuntateGratis" :
|
||||
TabDatiStatistici.IsChecked == true ? "DatiStatistici" :
|
||||
TabImpostazioni.IsChecked == true ? "Impostazioni" : "AsteAttive";
|
||||
|
||||
|
||||
if (!wasVisible)
|
||||
{
|
||||
await Dispatcher.InvokeAsync(() =>
|
||||
@@ -53,33 +51,33 @@ namespace AutoBidder
|
||||
});
|
||||
await Task.Delay(100);
|
||||
}
|
||||
|
||||
|
||||
// Specifica UserDataFolder esplicito
|
||||
var userDataFolder = System.IO.Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
"AutoBidder",
|
||||
"WebView2"
|
||||
);
|
||||
|
||||
|
||||
// Crea directory se non esiste
|
||||
System.IO.Directory.CreateDirectory(userDataFolder);
|
||||
|
||||
|
||||
// Crea environment con UserDataFolder esplicito
|
||||
var env = await Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(
|
||||
browserExecutableFolder: null,
|
||||
browserExecutableFolder: null,
|
||||
userDataFolder: userDataFolder
|
||||
);
|
||||
|
||||
|
||||
// Inizializza WebView con environment
|
||||
await EmbeddedWebView.EnsureCoreWebView2Async(env);
|
||||
|
||||
|
||||
// Ripristina tab originale se necessario
|
||||
if (!wasVisible)
|
||||
{
|
||||
await Dispatcher.InvokeAsync(() =>
|
||||
{
|
||||
Browser.Visibility = Visibility.Collapsed;
|
||||
|
||||
|
||||
// Ripristina tab originale
|
||||
switch (currentTab)
|
||||
{
|
||||
@@ -87,18 +85,9 @@ namespace AutoBidder
|
||||
TabAsteAttive.IsChecked = true;
|
||||
AuctionMonitor.Visibility = Visibility.Visible;
|
||||
break;
|
||||
case "Cerca":
|
||||
// "Cerca" mostra lo stesso controllo Browser, in modalità catalogo.
|
||||
TabCerca.IsChecked = true;
|
||||
Browser.Visibility = Visibility.Visible;
|
||||
break;
|
||||
case "Prodotti":
|
||||
TabProdotti.IsChecked = true;
|
||||
Products.Visibility = Visibility.Visible;
|
||||
break;
|
||||
case "PuntateGratis":
|
||||
TabPuntateGratis.IsChecked = true;
|
||||
FreeBids.Visibility = Visibility.Visible;
|
||||
PuntateGratisPanel.Visibility = Visibility.Visible;
|
||||
break;
|
||||
case "DatiStatistici":
|
||||
TabDatiStatistici.IsChecked = true;
|
||||
@@ -111,28 +100,28 @@ namespace AutoBidder
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (EmbeddedWebView.CoreWebView2 != null)
|
||||
{
|
||||
_isWebViewInitialized = true;
|
||||
|
||||
|
||||
// Pre-carica la pagina di Bidoo in background
|
||||
EmbeddedWebView.CoreWebView2.Navigate("https://it.bidoo.com");
|
||||
|
||||
|
||||
Log("[BROWSER] WebView2 inizializzato e pre-caricato", LogLevel.Success);
|
||||
|
||||
|
||||
// Registra evento per rilevare login automatico
|
||||
EmbeddedWebView.CoreWebView2.NavigationCompleted += OnWebViewNavigationCompleted;
|
||||
|
||||
// Notifica che WebView � pronta
|
||||
|
||||
// Notifica che WebView è pronta
|
||||
_webViewInitCompletionSource?.TrySetResult(true);
|
||||
|
||||
// Verifica immediata se c'� gi� un cookie
|
||||
|
||||
// Verifica immediata se c'è già un cookie
|
||||
await CheckAndImportCookieIfAvailable();
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("[ERROR] CoreWebView2 � null dopo init", LogLevel.Error);
|
||||
Log("[ERROR] CoreWebView2 è null dopo init", LogLevel.Error);
|
||||
_webViewInitCompletionSource?.TrySetResult(false);
|
||||
}
|
||||
}
|
||||
@@ -142,7 +131,7 @@ namespace AutoBidder
|
||||
_webViewInitCompletionSource?.TrySetResult(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verifica e importa cookie se disponibile
|
||||
/// </summary>
|
||||
@@ -152,24 +141,19 @@ namespace AutoBidder
|
||||
{
|
||||
// Aspetta che la pagina sia completamente caricata
|
||||
await Task.Delay(1000);
|
||||
|
||||
|
||||
var cookie = await GetCookieFromWebView();
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(cookie))
|
||||
{
|
||||
var currentSession = _sessionService?.GetCurrentSession();
|
||||
|
||||
|
||||
// Importa solo se diverso da quello salvato
|
||||
if (currentSession == null ||
|
||||
string.IsNullOrEmpty(currentSession.CookieString) ||
|
||||
if (currentSession == null ||
|
||||
string.IsNullOrEmpty(currentSession.CookieString) ||
|
||||
!currentSession.CookieString.Contains(cookie))
|
||||
{
|
||||
// Il browser scatena questo controllo a ogni navigazione: lo stesso
|
||||
// cookie non si importa (e non si scrive) due volte di fila.
|
||||
if ((DateTime.UtcNow - _lastImportedCookieAt).TotalSeconds < 60) return;
|
||||
_lastImportedCookieAt = DateTime.UtcNow;
|
||||
|
||||
Log("[BROWSER] Cookie rilevato nel browser: lo importo", LogLevel.Info);
|
||||
Log("[BROWSER] Cookie rilevato nel browser - importazione automatica...", LogLevel.Info);
|
||||
await AutoImportCookieFromWebView(cookie);
|
||||
}
|
||||
}
|
||||
@@ -179,9 +163,7 @@ namespace AutoBidder
|
||||
Log($"[WARN] Verifica cookie fallita: {ex.Message}", LogLevel.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
private DateTime _lastImportedCookieAt = DateTime.MinValue;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Aspetta che WebView sia inizializzata (con timeout)
|
||||
/// </summary>
|
||||
@@ -189,24 +171,24 @@ namespace AutoBidder
|
||||
{
|
||||
if (_isWebViewInitialized)
|
||||
return true;
|
||||
|
||||
|
||||
_webViewInitCompletionSource = new TaskCompletionSource<bool>();
|
||||
|
||||
|
||||
// Timeout
|
||||
var timeoutTask = Task.Delay(TimeSpan.FromSeconds(timeoutSeconds));
|
||||
var completedTask = await Task.WhenAny(_webViewInitCompletionSource.Task, timeoutTask);
|
||||
|
||||
|
||||
if (completedTask == timeoutTask)
|
||||
{
|
||||
Log("[WARN] Timeout attesa inizializzazione WebView2", LogLevel.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return await _webViewInitCompletionSource.Task;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Evento chiamato quando la navigazione nella WebView � completata
|
||||
/// Evento chiamato quando la navigazione nella WebView è completata
|
||||
/// Rileva automaticamente se l'utente ha effettuato il login
|
||||
/// </summary>
|
||||
private async void OnWebViewNavigationCompleted(object? sender, CoreWebView2NavigationCompletedEventArgs e)
|
||||
@@ -215,10 +197,10 @@ namespace AutoBidder
|
||||
{
|
||||
if (!e.IsSuccess || EmbeddedWebView?.CoreWebView2 == null)
|
||||
return;
|
||||
|
||||
|
||||
var url = EmbeddedWebView.CoreWebView2.Source;
|
||||
|
||||
// Se l'utente � sulla homepage di Bidoo (dopo login), verifica cookie
|
||||
|
||||
// Se l'utente è sulla homepage di Bidoo (dopo login), verifica cookie
|
||||
if (url.Contains("bidoo.com") && !url.Contains("login"))
|
||||
{
|
||||
// ? REFACTORED: Delega a CheckAndImportCookieIfAvailable
|
||||
@@ -227,7 +209,7 @@ namespace AutoBidder
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Importa automaticamente il cookie dalla WebView senza conferma utente
|
||||
/// </summary>
|
||||
@@ -237,21 +219,21 @@ namespace AutoBidder
|
||||
{
|
||||
// Valida e attiva il cookie usando SessionService
|
||||
var result = await _sessionService.ValidateAndActivateSessionAsync(cookieString);
|
||||
|
||||
|
||||
if (result.Success && result.Session != null)
|
||||
{
|
||||
// Salva automaticamente la sessione
|
||||
_sessionService.SaveSession(result.Session);
|
||||
|
||||
|
||||
// Aggiorna il banner
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
SetUserBanner(result.Session.Username, result.Session.RemainingBids);
|
||||
});
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
@@ -259,7 +241,7 @@ namespace AutoBidder
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Estrae il cookie __stattrb dalla WebView2
|
||||
/// </summary>
|
||||
@@ -270,25 +252,25 @@ namespace AutoBidder
|
||||
{
|
||||
if (EmbeddedWebView?.CoreWebView2 == null)
|
||||
return null;
|
||||
|
||||
|
||||
// Ottieni tutti i cookie di bidoo.com
|
||||
var cookies = await EmbeddedWebView.CoreWebView2.CookieManager.GetCookiesAsync("https://it.bidoo.com");
|
||||
|
||||
|
||||
if (cookies == null || cookies.Count == 0)
|
||||
return null;
|
||||
|
||||
|
||||
// Cerca il cookie __stattrb (cookie di sessione principale)
|
||||
var stattrb = cookies.FirstOrDefault(c => c.Name == "__stattrb");
|
||||
|
||||
|
||||
if (stattrb == null)
|
||||
return null;
|
||||
|
||||
|
||||
// Costruisci la stringa cookie completa con tutti i cookie necessari
|
||||
var cookieStrings = cookies
|
||||
.Where(c => !string.IsNullOrEmpty(c.Value))
|
||||
.Select(c => $"{c.Name}={c.Value}")
|
||||
.ToList();
|
||||
|
||||
|
||||
return string.Join("; ", cookieStrings);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -297,7 +279,7 @@ namespace AutoBidder
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Importa il cookie dalla WebView e lo salva per l'uso nelle API
|
||||
/// </summary>
|
||||
@@ -310,32 +292,32 @@ namespace AutoBidder
|
||||
Log("[WARN] Browser non inizializzato - attendi qualche secondo e riprova", LogLevel.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Log("[BROWSER] Estrazione cookie dal browser...", LogLevel.Info);
|
||||
|
||||
|
||||
var cookieString = await GetCookieFromWebView();
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(cookieString))
|
||||
{
|
||||
Log("[WARN] Nessun cookie trovato nel browser - assicurati di aver effettuato il login su bidoo.com", LogLevel.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ? NOTA: Non aggiorna pi� TextBox (rimossa) - direttamente alla validazione
|
||||
|
||||
|
||||
// ? NOTA: Non aggiorna più TextBox (rimossa) - direttamente alla validazione
|
||||
|
||||
// Valida e attiva il cookie usando SessionService
|
||||
var result = await _sessionService.ValidateAndActivateSessionAsync(cookieString);
|
||||
|
||||
|
||||
if (result.Success && result.Session != null)
|
||||
{
|
||||
// Salva automaticamente la sessione
|
||||
_sessionService.SaveSession(result.Session);
|
||||
|
||||
|
||||
// Aggiorna il banner
|
||||
SetUserBanner(result.Session.Username, result.Session.RemainingBids);
|
||||
|
||||
|
||||
Log($"[OK] Cookie importato e validato - Utente: {result.Session.Username}, Puntate: {result.Session.RemainingBids}", LogLevel.Success);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -350,9 +332,9 @@ namespace AutoBidder
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se WebView2 � pronta per l'uso
|
||||
/// Verifica se WebView2 è pronta per l'uso
|
||||
/// </summary>
|
||||
public bool IsWebViewReady()
|
||||
{
|
||||
@@ -0,0 +1 @@
|
||||
# This file ensures the data directory is tracked by git
|
||||
@@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using AutoBidder.Models;
|
||||
|
||||
namespace AutoBidder.Data;
|
||||
|
||||
/// <summary>
|
||||
/// DbContext per autenticazione Identity
|
||||
/// </summary>
|
||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||
{
|
||||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
base.OnModelCreating(builder);
|
||||
|
||||
// Personalizza nomi tabelle Identity (opzionale)
|
||||
builder.Entity<ApplicationUser>(entity =>
|
||||
{
|
||||
entity.ToTable("Users");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using AutoBidder.Models;
|
||||
|
||||
namespace AutoBidder.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Context Entity Framework per PostgreSQL - Database Statistiche Aste
|
||||
/// Gestisce aste concluse, metriche strategiche e analisi performance
|
||||
/// </summary>
|
||||
public class PostgresStatsContext : DbContext
|
||||
{
|
||||
public PostgresStatsContext(DbContextOptions<PostgresStatsContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
// Tabelle principali
|
||||
public DbSet<CompletedAuction> CompletedAuctions { get; set; }
|
||||
public DbSet<BidderPerformance> BidderPerformances { get; set; }
|
||||
public DbSet<ProductStatistic> ProductStatistics { get; set; }
|
||||
public DbSet<DailyMetric> DailyMetrics { get; set; }
|
||||
public DbSet<StrategicInsight> StrategicInsights { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
// Configurazione CompletedAuction
|
||||
modelBuilder.Entity<CompletedAuction>(entity =>
|
||||
{
|
||||
entity.ToTable("completed_auctions");
|
||||
entity.HasKey(e => e.Id);
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.AuctionId).HasColumnName("auction_id").IsRequired().HasMaxLength(100);
|
||||
entity.Property(e => e.ProductName).HasColumnName("product_name").IsRequired().HasMaxLength(500);
|
||||
entity.Property(e => e.FinalPrice).HasColumnName("final_price").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.BuyNowPrice).HasColumnName("buy_now_price").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.ShippingCost).HasColumnName("shipping_cost").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.TotalBids).HasColumnName("total_bids");
|
||||
entity.Property(e => e.MyBidsCount).HasColumnName("my_bids_count");
|
||||
entity.Property(e => e.ResetCount).HasColumnName("reset_count");
|
||||
entity.Property(e => e.Won).HasColumnName("won");
|
||||
entity.Property(e => e.WinnerUsername).HasColumnName("winner_username").HasMaxLength(100);
|
||||
entity.Property(e => e.CompletedAt).HasColumnName("completed_at");
|
||||
entity.Property(e => e.DurationSeconds).HasColumnName("duration_seconds");
|
||||
entity.Property(e => e.AverageLatency).HasColumnName("average_latency").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.Savings).HasColumnName("savings").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.TotalCost).HasColumnName("total_cost").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.CreatedAt).HasColumnName("created_at").HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||
|
||||
entity.HasIndex(e => e.AuctionId).HasDatabaseName("idx_auction_id");
|
||||
entity.HasIndex(e => e.ProductName).HasDatabaseName("idx_product_name");
|
||||
entity.HasIndex(e => e.CompletedAt).HasDatabaseName("idx_completed_at");
|
||||
entity.HasIndex(e => e.Won).HasDatabaseName("idx_won");
|
||||
});
|
||||
|
||||
// Configurazione BidderPerformance
|
||||
modelBuilder.Entity<BidderPerformance>(entity =>
|
||||
{
|
||||
entity.ToTable("bidder_performances");
|
||||
entity.HasKey(e => e.Id);
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Username).HasColumnName("username").IsRequired().HasMaxLength(100);
|
||||
entity.Property(e => e.TotalAuctions).HasColumnName("total_auctions");
|
||||
entity.Property(e => e.AuctionsWon).HasColumnName("auctions_won");
|
||||
entity.Property(e => e.AuctionsLost).HasColumnName("auctions_lost");
|
||||
entity.Property(e => e.TotalBidsPlaced).HasColumnName("total_bids_placed");
|
||||
entity.Property(e => e.WinRate).HasColumnName("win_rate").HasColumnType("decimal(5,2)");
|
||||
entity.Property(e => e.AverageBidsPerAuction).HasColumnName("average_bids_per_auction").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.AverageCompetition).HasColumnName("average_competition").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.IsAggressive).HasColumnName("is_aggressive");
|
||||
entity.Property(e => e.LastSeenAt).HasColumnName("last_seen_at");
|
||||
entity.Property(e => e.UpdatedAt).HasColumnName("updated_at").HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||
|
||||
entity.HasIndex(e => e.Username).IsUnique().HasDatabaseName("idx_username");
|
||||
entity.HasIndex(e => e.WinRate).HasDatabaseName("idx_win_rate");
|
||||
});
|
||||
|
||||
// Configurazione ProductStatistic
|
||||
modelBuilder.Entity<ProductStatistic>(entity =>
|
||||
{
|
||||
entity.ToTable("product_statistics");
|
||||
entity.HasKey(e => e.Id);
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.ProductKey).HasColumnName("product_key").IsRequired().HasMaxLength(200);
|
||||
entity.Property(e => e.ProductName).HasColumnName("product_name").IsRequired().HasMaxLength(500);
|
||||
entity.Property(e => e.TotalAuctions).HasColumnName("total_auctions");
|
||||
entity.Property(e => e.AverageWinningBids).HasColumnName("average_winning_bids").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.AverageFinalPrice).HasColumnName("average_final_price").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.AverageResets).HasColumnName("average_resets").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.MinBidsSeen).HasColumnName("min_bids_seen");
|
||||
entity.Property(e => e.MaxBidsSeen).HasColumnName("max_bids_seen");
|
||||
entity.Property(e => e.RecommendedMaxBids).HasColumnName("recommended_max_bids");
|
||||
entity.Property(e => e.RecommendedMaxPrice).HasColumnName("recommended_max_price").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.CompetitionLevel).HasColumnName("competition_level").HasMaxLength(20);
|
||||
entity.Property(e => e.LastUpdated).HasColumnName("last_updated").HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||
|
||||
entity.HasIndex(e => e.ProductKey).IsUnique().HasDatabaseName("idx_product_key");
|
||||
entity.HasIndex(e => e.ProductName).HasDatabaseName("idx_product_name_stats");
|
||||
});
|
||||
|
||||
// Configurazione DailyMetric
|
||||
modelBuilder.Entity<DailyMetric>(entity =>
|
||||
{
|
||||
entity.ToTable("daily_metrics");
|
||||
entity.HasKey(e => e.Id);
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Date).HasColumnName("date").HasColumnType("date");
|
||||
entity.Property(e => e.TotalBidsUsed).HasColumnName("total_bids_used");
|
||||
entity.Property(e => e.MoneySpent).HasColumnName("money_spent").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.AuctionsWon).HasColumnName("auctions_won");
|
||||
entity.Property(e => e.AuctionsLost).HasColumnName("auctions_lost");
|
||||
entity.Property(e => e.TotalSavings).HasColumnName("total_savings").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.AverageLatency).HasColumnName("average_latency").HasColumnType("decimal(10,2)");
|
||||
entity.Property(e => e.WinRate).HasColumnName("win_rate").HasColumnType("decimal(5,2)");
|
||||
entity.Property(e => e.ROI).HasColumnName("roi").HasColumnType("decimal(10,2)");
|
||||
|
||||
entity.HasIndex(e => e.Date).IsUnique().HasDatabaseName("idx_date");
|
||||
});
|
||||
|
||||
// Configurazione StrategicInsight
|
||||
modelBuilder.Entity<StrategicInsight>(entity =>
|
||||
{
|
||||
entity.ToTable("strategic_insights");
|
||||
entity.HasKey(e => e.Id);
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.InsightType).HasColumnName("insight_type").IsRequired().HasMaxLength(50);
|
||||
entity.Property(e => e.ProductKey).HasColumnName("product_key").HasMaxLength(200);
|
||||
entity.Property(e => e.RecommendedAction).HasColumnName("recommended_action").IsRequired();
|
||||
entity.Property(e => e.ConfidenceLevel).HasColumnName("confidence_level").HasColumnType("decimal(5,2)");
|
||||
entity.Property(e => e.DataPoints).HasColumnName("data_points");
|
||||
entity.Property(e => e.Reasoning).HasColumnName("reasoning");
|
||||
entity.Property(e => e.CreatedAt).HasColumnName("created_at").HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||
entity.Property(e => e.IsActive).HasColumnName("is_active").HasDefaultValue(true);
|
||||
|
||||
entity.HasIndex(e => e.InsightType).HasDatabaseName("idx_insight_type");
|
||||
entity.HasIndex(e => e.ProductKey).HasDatabaseName("idx_product_key_insight");
|
||||
entity.HasIndex(e => e.CreatedAt).HasDatabaseName("idx_created_at");
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica e crea lo schema del database
|
||||
/// </summary>
|
||||
public async Task<bool> EnsureSchemaAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Verifica connessione
|
||||
if (!await Database.CanConnectAsync())
|
||||
{
|
||||
Console.WriteLine("[PostgreSQL] Cannot connect to database");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Crea schema se non esistono le tabelle (senza migrations)
|
||||
var created = await Database.EnsureCreatedAsync();
|
||||
|
||||
if (created)
|
||||
{
|
||||
Console.WriteLine("[PostgreSQL] Schema created successfully");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("[PostgreSQL] Schema already exists");
|
||||
}
|
||||
|
||||
// Verifica che tutte le tabelle esistano
|
||||
var hasCompletedAuctions = await CompletedAuctions.AnyAsync();
|
||||
Console.WriteLine($"[PostgreSQL] Database verified - {(hasCompletedAuctions ? "has data" : "empty")}");
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"[PostgreSQL ERROR] Schema creation failed: {ex.Message}");
|
||||
Console.WriteLine($"[PostgreSQL ERROR] Stack trace: {ex.StackTrace}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica che tutte le tabelle richieste esistano
|
||||
/// </summary>
|
||||
public async Task<bool> ValidateSchemaAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Prova a contare le righe di ogni tabella (forza check esistenza)
|
||||
await CompletedAuctions.CountAsync();
|
||||
await BidderPerformances.CountAsync();
|
||||
await ProductStatistics.CountAsync();
|
||||
await DailyMetrics.CountAsync();
|
||||
await StrategicInsights.CountAsync();
|
||||
|
||||
Console.WriteLine("[PostgreSQL] All tables validated successfully");
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"[PostgreSQL ERROR] Schema validation failed: {ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using AutoBidder.Models;
|
||||
|
||||
namespace AutoBidder.Data
|
||||
{
|
||||
public class StatisticsContext : DbContext
|
||||
{
|
||||
public DbSet<ProductStat> ProductStats { get; set; }
|
||||
|
||||
public StatisticsContext(DbContextOptions<StatisticsContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<ProductStat>()
|
||||
.HasIndex(p => p.ProductKey)
|
||||
.IsUnique(false);
|
||||
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,11 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:AutoBidder.Controls"
|
||||
Title="Aggiungi Asta" Height="320" Width="700"
|
||||
Background="{DynamicResource Brush.Bg}" Foreground="{DynamicResource Brush.Text}"
|
||||
Background="#0a0a0a" Foreground="#FFFFFF"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Icon="pack://application:,,,/Icon/favicon.ico"
|
||||
ResizeMode="NoResize">
|
||||
<Border Background="{DynamicResource Brush.Bg}" CornerRadius="8" Padding="16" Margin="8">
|
||||
<Border Background="#1a1a1a" CornerRadius="8" Padding="16" Margin="8">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -16,11 +17,11 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="Inserire URL dell'asta (uno o più)" Foreground="{DynamicResource Brush.Text}" FontSize="14" Margin="0,0,0,6" />
|
||||
<TextBlock Grid.Row="1" Text="Puoi aggiungere più link separandoli con 'a capo', 'spazio' o ';'" Foreground="{DynamicResource Brush.TextMuted}" FontSize="12" Margin="0,0,0,10" />
|
||||
<TextBlock Text="Inserire URL dell'asta (uno o più)" Foreground="#CCCCCC" FontSize="14" Margin="0,0,0,6" />
|
||||
<TextBlock Grid.Row="1" Text="Puoi aggiungere più link separandoli con 'a capo', 'spazio' o ';'" Foreground="#999999" FontSize="12" Margin="0,0,0,10" />
|
||||
|
||||
<TextBox x:Name="AuctionUrlBox" Grid.Row="2" MinWidth="560" Margin="0,0,0,8"
|
||||
Background="{DynamicResource Brush.Bg}" Foreground="{DynamicResource Brush.Info}" BorderBrush="{DynamicResource Brush.Border}" BorderThickness="1"
|
||||
Background="#181818" Foreground="#00CCFF" BorderBrush="#444" BorderThickness="1"
|
||||
Padding="8" FontSize="13" ToolTip="Inserisci uno o più URL/ID dell'asta. Separali con a capo, spazio o ';'"
|
||||
AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" Height="160" />
|
||||
|
||||
@@ -28,9 +29,9 @@
|
||||
<controls:SimpleToolbar.RightContent>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="OK" Width="110" Margin="6" Padding="10,8"
|
||||
Style="{StaticResource SmallButtonStyle}" Background="{DynamicResource Brush.Success}" Foreground="{DynamicResource Brush.TextOnAccent}" Click="OkButton_Click" />
|
||||
Style="{StaticResource SmallButtonStyle}" Background="#00CC66" Foreground="White" Click="OkButton_Click" />
|
||||
<Button Content="Annulla" Width="110" Margin="6" Padding="10,8"
|
||||
Style="{StaticResource SmallButtonStyle}" Background="{DynamicResource Brush.SurfaceAlt}" Foreground="{DynamicResource Brush.Text}" Click="CancelButton_Click" />
|
||||
Style="{StaticResource SmallButtonStyle}" Background="#666" Foreground="White" Click="CancelButton_Click" />
|
||||
</StackPanel>
|
||||
</controls:SimpleToolbar.RightContent>
|
||||
</controls:SimpleToolbar>
|
||||
@@ -0,0 +1,89 @@
|
||||
<Window x:Class="AutoBidder.Dialogs.ClosedAuctionsWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Aste Chiuse - Estrazione" Height="600" Width="1000"
|
||||
Background="#0a0a0a" Foreground="#FFFFFF" WindowStartupLocation="CenterOwner">
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="8" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Background="#1a1a1a" Padding="10" CornerRadius="6" Grid.Row="0" BorderBrush="#333333" BorderThickness="1">
|
||||
<DockPanel>
|
||||
<TextBlock Text="Estrazione Aste Chiuse" FontSize="16" FontWeight="Bold" Foreground="#00CC66" VerticalAlignment="Center" DockPanel.Dock="Left" />
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Right">
|
||||
<Button x:Name="StartExtractButton" Content="Avvia Estrazione" Click="StartExtractButton_Click" Width="140" Height="36" Margin="8,0,0,0" Background="#00CC66" Style="{StaticResource SmallButtonStyle}"/>
|
||||
<Button x:Name="ExportStatsButton" Content="Esporta Statistiche" Click="ExportStatsButton_Click" Width="160" Height="36" Margin="8,0,0,0" Background="#8B5CF6" Style="{StaticResource SmallButtonStyle}"/>
|
||||
<Button x:Name="CloseButton" Content="Chiudi" Click="CloseButton_Click" Width="80" Height="36" Margin="8,0,0,0" Background="#666" Style="{StaticResource SmallButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="2" Background="#1a1a1a" Padding="8" CornerRadius="6" BorderBrush="#333333" BorderThickness="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="8" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Products grid: styled like MainWindow -->
|
||||
<DataGrid x:Name="ProductsGrid" AutoGenerateColumns="False" Grid.Column="0" Background="#1a1a1a" Foreground="#FFFFFF" BorderBrush="#333333" BorderThickness="1"
|
||||
RowBackground="#1a1a1a" AlternatingRowBackground="#222222" GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="#333333"
|
||||
IsReadOnly="True" SelectionUnit="CellOrRowHeader" SelectionMode="Extended" ClipboardCopyMode="IncludeHeader" CanUserAddRows="False" CanUserDeleteRows="False">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="Background" Value="#2a2a2a" />
|
||||
<Setter Property="Foreground" Value="#FFFFFF" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Padding" Value="10,8" />
|
||||
<Setter Property="BorderThickness" Value="0,0,0,2" />
|
||||
<Setter Property="BorderBrush" Value="#00CC66" />
|
||||
</Style>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="Height" Value="36" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#0099FF" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="10,6" />
|
||||
</Style>
|
||||
</DataGrid.Resources>
|
||||
|
||||
<DataGrid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="ApplicationCommands.Copy" Header="Copia" />
|
||||
</ContextMenu>
|
||||
</DataGrid.ContextMenu>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Asta URL" Binding="{Binding AuctionUrl}" Width="2*" />
|
||||
<DataGridTextColumn Header="Nome" Binding="{Binding ProductName}" Width="3*"/>
|
||||
<DataGridTextColumn Header="Prezzo" Binding="{Binding FinalPrice}" Width="80"/>
|
||||
<DataGridTextColumn Header="Vincitore" Binding="{Binding Winner}" Width="120"/>
|
||||
<DataGridTextColumn Header="Puntate Usate" Binding="{Binding BidsUsed}" Width="100"/>
|
||||
<DataGridTextColumn Header="Scraped At" Binding="{Binding ScrapedAt}" Width="140"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<GridSplitter Grid.Column="1" Width="8" />
|
||||
|
||||
<!-- Log area styled like main window log -->
|
||||
<Border Grid.Column="2" Background="#0f0f0f" Padding="8" CornerRadius="6" BorderBrush="#333333" BorderThickness="1">
|
||||
<DockPanel>
|
||||
<TextBlock Text="Log Operazioni" FontWeight="Bold" Foreground="#00CC66" DockPanel.Dock="Top" Margin="0,0,0,8" />
|
||||
<RichTextBox x:Name="ExtractLogBox" IsReadOnly="True" VerticalScrollBarVisibility="Auto" FontFamily="Consolas" FontSize="11" Background="#0f0f0f" Foreground="#CCC" BorderBrush="#333333" BorderThickness="1" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,140 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
using Microsoft.Win32;
|
||||
using AutoBidder.Models;
|
||||
using AutoBidder.Services;
|
||||
using AutoBidder.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AutoBidder.Dialogs
|
||||
{
|
||||
public partial class ClosedAuctionsWindow : Window
|
||||
{
|
||||
private ObservableCollection<ClosedAuctionRecord> _products = new();
|
||||
|
||||
private bool _isRunning = false;
|
||||
|
||||
// StatsService using local DB. Create context with default sqlite file in app folder
|
||||
private readonly StatsService _statsService;
|
||||
|
||||
public ClosedAuctionsWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
ProductsGrid.ItemsSource = _products;
|
||||
|
||||
var optionsBuilder = new DbContextOptionsBuilder<StatisticsContext>();
|
||||
var dbPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "stats.db");
|
||||
optionsBuilder.UseSqlite($"Data Source={dbPath}");
|
||||
var ctx = new StatisticsContext(optionsBuilder.Options);
|
||||
_statsService = new StatsService(ctx);
|
||||
|
||||
Log("Finestra pronta");
|
||||
}
|
||||
|
||||
private void Log(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
var para = new Paragraph(new Run($"{DateTime.Now:HH:mm} - {message}"));
|
||||
ExtractLogBox.Document.Blocks.Add(para);
|
||||
// keep size manageable
|
||||
while (ExtractLogBox.Document.Blocks.Count > 500)
|
||||
ExtractLogBox.Document.Blocks.Remove(ExtractLogBox.Document.Blocks.FirstBlock);
|
||||
ExtractLogBox.ScrollToEnd();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private async void StartExtractButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (_isRunning)
|
||||
{
|
||||
Log("Estrazione già in corso");
|
||||
return;
|
||||
}
|
||||
|
||||
_isRunning = true;
|
||||
StartExtractButton.IsEnabled = false;
|
||||
Log("Avvio procedura di estrazione da closed_auctions.php...");
|
||||
|
||||
try
|
||||
{
|
||||
var scraper = new ClosedAuctionsScraper(null, _statsService, Log);
|
||||
var closedUrl = "https://it.bidoo.com/closed_auctions.php";
|
||||
|
||||
Log($"Scarico: {closedUrl}");
|
||||
|
||||
int count = 0;
|
||||
await foreach (var rec in scraper.ScrapeYieldAsync(closedUrl))
|
||||
{
|
||||
// Filter out records without bids info (user requested)
|
||||
if (!rec.BidsUsed.HasValue)
|
||||
{
|
||||
Log($"Scartata asta (mancano puntate): {rec.AuctionUrl} - '{rec.ProductName ?? "?"}'");
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add and log incrementally so user sees progress
|
||||
_products.Add(rec);
|
||||
count++;
|
||||
Log($"[{count}] {rec.ProductName} | Prezzo: {(rec.FinalPrice.HasValue?rec.FinalPrice.Value.ToString("F2")+"€":"--")} | Vincitore: {rec.Winner ?? "--"} | Puntate: {rec.BidsUsed.Value} | URL: {rec.AuctionUrl}");
|
||||
}
|
||||
|
||||
Log($"Estrazione completata: {count} record aggiunti.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Estrattore: {ex.Message}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
_isRunning = false;
|
||||
StartExtractButton.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private async void ExportStatsButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log("Preparazione esportazione statistiche...");
|
||||
var stats = await _statsService.GetAllStatsAsync();
|
||||
if (stats == null || stats.Count == 0)
|
||||
{
|
||||
Log("Nessuna statistica disponibile da esportare.");
|
||||
MessageBox.Show(this, "Nessuna statistica disponibile.", "Esporta Statistiche", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
var dlg = new SaveFileDialog() { Filter = "CSV files|*.csv|All files|*.*", FileName = "auction_stats.csv" };
|
||||
if (dlg.ShowDialog(this) != true) return;
|
||||
|
||||
using var sw = new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8);
|
||||
sw.WriteLine("ProductKey,ProductName,TotalAuctions,AverageBidsUsed,AverageFinalPrice,LastSeen");
|
||||
foreach (var s in stats)
|
||||
{
|
||||
var line = $"\"{s.ProductKey}\",\"{s.ProductName}\",{s.TotalAuctions},{s.AverageBidsUsed:F2},{s.AverageFinalPrice:F2},{s.LastSeen:O}";
|
||||
sw.WriteLine(line);
|
||||
}
|
||||
|
||||
Log($"Statistiche esportate su: {dlg.FileName}");
|
||||
MessageBox.Show(this, "Statistiche esportate con successo.", "Esporta Statistiche", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"[ERRORE] Esporta: {ex.Message}");
|
||||
MessageBox.Show(this, "Errore durante esportazione: " + ex.Message, "Esporta Statistiche", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,11 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Configura Sessione" Height="440" Width="700"
|
||||
Background="{DynamicResource Brush.Bg}" Foreground="{DynamicResource Brush.Text}"
|
||||
Background="#0a0a0a" Foreground="#FFFFFF"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Icon="pack://application:,,,/Icon/favicon.ico"
|
||||
ResizeMode="NoResize">
|
||||
<Border Background="{DynamicResource Brush.Bg}" CornerRadius="8" Padding="16" Margin="8">
|
||||
<Border Background="#1a1a1a" CornerRadius="8" Padding="16" Margin="8">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -14,9 +15,9 @@
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Inserisci Cookie di sessione" FontSize="16" FontWeight="SemiBold" Foreground="{DynamicResource Brush.Success}" Margin="0,0,0,12" />
|
||||
<TextBlock Grid.Row="1" Text="Cookie di sessione (copia dal menu delle Impostazioni/Applicazioni di Chrome)" Foreground="{DynamicResource Brush.Text}" FontSize="13" />
|
||||
<TextBlock Grid.Row="2" Foreground="{DynamicResource Brush.TextMuted}" FontSize="12" TextWrapping="Wrap" Margin="0,4,0,10">
|
||||
<TextBlock Text="Inserisci Cookie di sessione" FontSize="16" FontWeight="SemiBold" Foreground="#00CC66" Margin="0,0,0,12" />
|
||||
<TextBlock Grid.Row="1" Text="Cookie di sessione (copia dal menu delle Impostazioni/Applicazioni di Chrome)" Foreground="#CCCCCC" FontSize="13" />
|
||||
<TextBlock Grid.Row="2" Foreground="#888" FontSize="12" TextWrapping="Wrap" Margin="0,4,0,10">
|
||||
<Run Text="Come trovare i cookie di sessione in Chrome:" />
|
||||
<LineBreak/>
|
||||
<Run Text="1. Apri Chrome e premi F12 (Windows) o Cmd+Option+I (Mac) per aprire gli Strumenti per sviluppatori." />
|
||||
@@ -28,12 +29,12 @@
|
||||
<Run Text="4. Scegli il sito desiderato e copia il valore del cookie di sessione." />
|
||||
</TextBlock>
|
||||
<TextBox x:Name="CookieBox" Grid.Row="3" MinWidth="320" MinHeight="120" MaxHeight="220" VerticalScrollBarVisibility="Auto"
|
||||
Background="{DynamicResource Brush.Bg}" Foreground="{DynamicResource Brush.Info}" BorderBrush="{DynamicResource Brush.Border}" BorderThickness="1" Padding="8" FontSize="14" AcceptsReturn="True" TextWrapping="Wrap" />
|
||||
Background="#181818" Foreground="#00CCFF" BorderBrush="#444" BorderThickness="1" Padding="8" FontSize="14" AcceptsReturn="True" TextWrapping="Wrap" />
|
||||
<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,12,0,0">
|
||||
<Button x:Name="OkButton" Content="OK" Width="110" Margin="6" Padding="10,8"
|
||||
Style="{StaticResource SmallButtonStyle}" Background="{DynamicResource Brush.Success}" Foreground="{DynamicResource Brush.TextOnAccent}" Click="OkButton_Click" />
|
||||
Style="{StaticResource SmallButtonStyle}" Background="#00CC66" Foreground="White" Click="OkButton_Click" />
|
||||
<Button x:Name="CancelButton" Content="Annulla" Width="110" Margin="6" Padding="10,8"
|
||||
Style="{StaticResource SmallButtonStyle}" Background="{DynamicResource Brush.SurfaceAlt}" Foreground="{DynamicResource Brush.Text}" Click="CancelButton_Click" />
|
||||
Style="{StaticResource SmallButtonStyle}" Background="#666" Foreground="White" Click="CancelButton_Click" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
@@ -1,40 +0,0 @@
|
||||
<Project>
|
||||
|
||||
<!--
|
||||
Unica origine della versione: la leggono il binario (/salute, barra dell'interfaccia,
|
||||
/config/versione.txt), l'immagine Docker (build-arg VERSION) e il workflow di rilascio,
|
||||
che rifiuta un tag vX.Y.Z diverso da questo numero.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0</Version>
|
||||
<Product>Bidoo BidBot</Product>
|
||||
<Company>Alberto Balbo</Company>
|
||||
<Copyright>Uso personale</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NeutralLanguage>it-IT</NeutralLanguage>
|
||||
<SatelliteResourceLanguages>it</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
Motore a bassa latenza (specifica §6.3). GC di workstation concorrente: pause brevi e
|
||||
prevedibili contano più del rendimento; il GC di server alloca un heap per core e fa
|
||||
pause più lunghe, ed è pensato per molte richieste indipendenti, non per un thread
|
||||
cecchino che deve svegliarsi al millisecondo. Globalizzazione vera (non invariante):
|
||||
numeri e date all'italiana.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<ServerGarbageCollection>false</ServerGarbageCollection>
|
||||
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
|
||||
<TieredPGO>true</TieredPGO>
|
||||
<InvariantGlobalization>false</InvariantGlobalization>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,81 @@
|
||||
# ============================================
|
||||
# STAGE 1: Build
|
||||
# ============================================
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
|
||||
# Copy csproj and restore dependencies (cache layer)
|
||||
COPY ["AutoBidder.csproj", "."]
|
||||
RUN dotnet restore "./AutoBidder.csproj"
|
||||
|
||||
# Copy all source files
|
||||
COPY . .
|
||||
|
||||
# Build application
|
||||
WORKDIR "/src/."
|
||||
RUN dotnet build "./AutoBidder.csproj" -c $BUILD_CONFIGURATION -o /app/build --no-restore
|
||||
|
||||
# ============================================
|
||||
# STAGE 2: Publish
|
||||
# ============================================
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
# RIMOSSO --no-build per evitare errore path
|
||||
RUN dotnet publish "./AutoBidder.csproj" \
|
||||
-c $BUILD_CONFIGURATION \
|
||||
-o /app/publish \
|
||||
/p:UseAppHost=false
|
||||
|
||||
# ============================================
|
||||
# STAGE 3: Final Runtime
|
||||
# ============================================
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
||||
WORKDIR /app
|
||||
|
||||
# Install curl for healthcheck and sqlite3
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
ca-certificates \
|
||||
sqlite3 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create data directories for persistence
|
||||
RUN mkdir -p /app/Data /app/Data/backups /app/logs && \
|
||||
chmod 777 /app/Data /app/logs
|
||||
|
||||
# Copy published application
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
# Expose port (single HTTP for simplicity)
|
||||
EXPOSE 8080
|
||||
|
||||
# Environment variables (overridable via docker-compose/unraid)
|
||||
ENV ASPNETCORE_URLS=http://+:8080
|
||||
ENV ASPNETCORE_ENVIRONMENT=Production
|
||||
ENV Kestrel__EnableHttps=false
|
||||
|
||||
# Database path - tutti i database SQLite e dati persistenti
|
||||
# Può essere sovrascritto nel docker-compose per mappare un volume persistente
|
||||
ENV DATA_PATH=/app/Data
|
||||
|
||||
# Autenticazione applicazione (OBBLIGATORIO)
|
||||
ENV ADMIN_USERNAME=admin
|
||||
ENV ADMIN_PASSWORD=
|
||||
|
||||
# Health check
|
||||
# Aumentato timeout e start-period per Blazor Server
|
||||
HEALTHCHECK --interval=30s --timeout=30s --start-period=90s --retries=5 \
|
||||
CMD curl -f http://localhost:8080/ || exit 1
|
||||
|
||||
# Labels for metadata
|
||||
LABEL org.opencontainers.image.title="AutoBidder" \
|
||||
org.opencontainers.image.description="Sistema automatizzato gestione aste Bidoo - Blazor .NET 8" \
|
||||
org.opencontainers.image.version="1.2.0" \
|
||||
org.opencontainers.image.vendor="Alby96" \
|
||||
org.opencontainers.image.source="https://gitea.encke-hake.ts.net/Alby96/Mimante"
|
||||
|
||||
# Entry point
|
||||
ENTRYPOINT ["dotnet", "AutoBidder.dll"]
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
______________________________________________________________________________________________________________
|
||||
FUNZIONALITA
|
||||
|
||||
Cambiare la pagina delle statistiche in modo da aggiungere una sezione in più, oltre alle statistiche memorizzate in un automatico, in cui posso associare un range di prezzo e di puntate per ogni articolo, identificato tramite il suo nome
|
||||
|
||||
Aggiungere una scansione periodica e automatica delle aste terminate in modo da aggiornare automaticamente il mio elenco degli articoli delle aste terminate per aggiornare prezzo e numero di puntate usate in automatico. Molto importante: salvare anche l'ora di chiusura dell'asta
|
||||
|
||||
Aggiungere una funzionalità di aggiunta automatica delle aste al monitor appena compaiono nell'elenco delle aste disponibile cercando tramite sezione e nome articolo
|
||||
|
||||
Aggiungi una indicazione visiva nella colonna dello stato che indica quando un'asta pur essendo nello stato attiva il bot non punta perché fuori range oppure per altri motivi
|
||||
|
||||
Fare una tasto nelle statistiche che applichi massivamente i limiti a tutti gli articoli attualmente monitorati che hanno delle informazioni salvate nel database delle aste terminate
|
||||
|
||||
_______________________________________________________________________________________________________________
|
||||
REWORK
|
||||
|
||||
Esegui un rework generico del sistema di log della singola asta e del log globale. Ci sono troppe righe inutili come tante righe simili duplicate nel log della singola asta e informazioni inutili nel log globale come per esempio l'indicazione del focus che si sposta su una certa riga. Valuta i cambiamenti e le ottimizzazioni da fare e applica le modifiche.
|
||||
|
||||
Esegui un rework della grafica in modo da eliminare le animazioni popup che danno fastidio all'usabilità del programma. In particolare intendo che quando il mouse passa su un pulsante o una griglia questa aumenta leggermente di dimensione per evidenziarsi ma questo non mi piace. Elimina questa cosa e sostituiscila piuttosto con una illuminazione o colorazione più chiara o scura per evidenziare il fatto che sto per selezionare quel particolare pulsante
|
||||
|
||||
_______________________________________________________________________________________________________________
|
||||
CORREZIONI
|
||||
|
||||
Aggiungi più stati per indicare la strategia o il fatto che non sta puntando e per quale motivo.
|
||||
In particolare oltre agli stati già presenti indicare anche il motivo per cui non sta puntando come per esempio "fuori range di prezzo", "fuori range di puntate", "asta terminata", "strategia non permette puntata", ecc
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="17px" height="18px" viewBox="0 0 17 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 57.1 (101010) - https://sketch.com -->
|
||||
<title>E3DC3394-397D-4994-B12B-47234FB13863</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<g id="Product-Pages" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Home---Portrait-Version-A-Copy-6" transform="translate(-77.000000, -637.000000)">
|
||||
<g id="Group-20" transform="translate(63.000000, 553.000000)">
|
||||
<g id="Group-17-Copy" transform="translate(14.000000, 84.000000)">
|
||||
<g id="001-settings" transform="translate(0.000000, 0.500000)">
|
||||
<path d="M15.6392002,7.48800011 C14.1532002,7.20200011 13.4720002,5.46640008 14.3672002,4.24600006 L14.9952002,3.38800005 L13.6376002,2.03040003 L12.7936002,2.60200004 C11.5408002,3.45200005 9.83120015,2.70520004 9.60160014,1.21000002 L9.44080014,0.160000002 L7.52040011,0.160000002 L7.27200011,1.45360002 C6.9920001,2.90520004 5.31720008,3.59920005 4.09200006,2.76920004 L3.00320004,2.03040003 L1.64520002,3.38800005 L2.27360003,4.24600006 C3.16880005,5.46640008 2.48600004,7.20200011 1.00160001,7.48800011 L0,7.68040011 L0,9.60080014 L1.05000002,9.76160015 C2.54520004,9.99120015 3.29200005,11.7008002 2.44200004,12.9536002 L1.87040003,13.7976002 L3.22800005,15.1552002 L4.08600006,14.5272002 C5.30640008,13.6320002 7.0420001,14.3132002 7.32800011,15.7992002 L7.52040011,16.8008003 L9.44080014,16.8008003 L9.55320014,16.0616002 C9.78920015,14.5336002 11.5608002,13.7992002 12.8080002,14.7132002 L13.4108002,15.1552002 L14.7688002,13.7976002 L14.1968002,12.9536002 C13.3484002,11.7008002 14.0936002,9.99120015 15.5892002,9.76160015 L16.6408002,9.60080014 L16.6408002,7.68040011 L15.6392002,7.48800011 Z M8.47960013,10.0804002 C7.68440011,10.0804002 7.0408001,9.43520014 7.0408001,8.63960013 C7.0408001,7.84440012 7.68440011,7.20080011 8.47960013,7.20080011 C9.27520014,7.20080011 9.92040015,7.84440012 9.92040015,8.63960013 C9.92040015,9.43520014 9.27520014,10.0804002 8.47960013,10.0804002 Z" id="Fill-1" fill="#C7CAC7"/>
|
||||
<path d="M8.47960013,5.60080008 C6.8016001,5.60080008 5.44080008,6.9616001 5.44080008,8.63960013 C5.44080008,10.3192002 6.8016001,11.6804002 8.47960013,11.6804002 C10.1592002,11.6804002 11.5204002,10.3192002 11.5204002,8.63960013 C11.5204002,6.9616001 10.1592002,5.60080008 8.47960013,5.60080008 Z M8.47960013,10.0804002 C7.68440011,10.0804002 7.0408001,9.43520014 7.0408001,8.63960013 C7.0408001,7.84440012 7.68440011,7.20080011 8.47960013,7.20080011 C9.27520014,7.20080011 9.92040015,7.84440012 9.92040015,8.63960013 C9.92040015,9.43520014 9.27520014,10.0804002 8.47960013,10.0804002 Z" id="Fill-2" fill="#556080"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18.96 32.35"><defs><style>.cls-1{fill:#38454f;}.cls-2{fill:#1caee4;}.cls-3{fill:#1081e0;}.cls-4{fill:#cbd4d8;}.cls-5{fill:#546a79;}</style></defs><title>Asset 10002-app</title><g id="Layer_2" data-name="Layer 2"><g id="Livello_1" data-name="Livello 1"><path class="cls-1" d="M15.76,32.35H3.2A3.21,3.21,0,0,1,0,29.14V3.2A3.2,3.2,0,0,1,3.2,0H15.76A3.2,3.2,0,0,1,19,3.2V29.14A3.21,3.21,0,0,1,15.76,32.35Z"/><rect class="cls-2" x="1.67" y="3.35" width="15.61" height="23.98"/><path class="cls-3" d="M3.35,7.81a.56.56,0,0,0,.39-.17L6,5.41a.56.56,0,0,0,0-.79.57.57,0,0,0-.79,0L3,6.86a.54.54,0,0,0,0,.78A.56.56,0,0,0,3.35,7.81Z"/><path class="cls-3" d="M3.35,10.6a.56.56,0,0,0,.39-.17L4.86,9.32a.57.57,0,0,0,0-.79.56.56,0,0,0-.79,0L3,9.64a.57.57,0,0,0,.4,1Z"/><path class="cls-3" d="M5.18,7.41a.59.59,0,0,0-.16.4.57.57,0,0,0,.16.39.6.6,0,0,0,.4.17A.58.58,0,0,0,6,8.2a.57.57,0,0,0,.16-.39.56.56,0,0,0-1-.4Z"/><path class="cls-3" d="M6.3,7.09a.54.54,0,0,0,.39.16.57.57,0,0,0,.4-.16L8.76,5.41a.56.56,0,0,0,0-.79.57.57,0,0,0-.79,0L6.3,6.3A.56.56,0,0,0,6.3,7.09Z"/><path class="cls-3" d="M8,7.41l-5,5a.56.56,0,0,0,.4,1,.54.54,0,0,0,.39-.16l5-5a.56.56,0,0,0,0-.79A.57.57,0,0,0,8,7.41Z"/><path class="cls-3" d="M9.08,6.3a.57.57,0,0,0-.16.39.59.59,0,0,0,.16.4.61.61,0,0,0,.4.16A.55.55,0,0,0,10,6.69a.57.57,0,0,0-.16-.39A.59.59,0,0,0,9.08,6.3Z"/><path class="cls-3" d="M11.55,4.62a.57.57,0,0,0-.79,0l-.56.56a.56.56,0,0,0,.4,1A.54.54,0,0,0,11,6l.56-.56A.56.56,0,0,0,11.55,4.62Z"/><path class="cls-4" d="M11.15,2.23H7.81a.56.56,0,0,1-.56-.56.55.55,0,0,1,.56-.55h3.34a.55.55,0,0,1,.56.55A.56.56,0,0,1,11.15,2.23Z"/><path class="cls-5" d="M16.17,2.23h-.56a.56.56,0,0,1-.55-.56.55.55,0,0,1,.55-.55h.56a.55.55,0,0,1,.56.55A.56.56,0,0,1,16.17,2.23Z"/><path class="cls-5" d="M13.94,2.23h-.56a.56.56,0,0,1-.55-.56.55.55,0,0,1,.55-.55h.56a.55.55,0,0,1,.56.55A.56.56,0,0,1,13.94,2.23Z"/><path class="cls-4" d="M10.87,30.67H8.09a.84.84,0,0,1-.84-.83h0A.85.85,0,0,1,8.09,29h2.78a.85.85,0,0,1,.84.84h0A.84.84,0,0,1,10.87,30.67Z"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31.83 32.52"><defs><style>.cls-1{fill:#ffd039;}.cls-2{fill:#f4b70c;}.cls-3{fill:#ffbb64;}.cls-4{fill:#ffae47;}.cls-5{fill:#ffdf65;}.cls-6{fill:#ffcd2c;}.cls-7{fill:#ffa035;}.cls-8{fill:#f78819;}</style></defs><title>Asset 9002-cup</title><g id="Layer_2" data-name="Layer 2"><g id="Livello_1" data-name="Livello 1"><path class="cls-1" d="M31.05,5.85h0a3.61,3.61,0,0,0-2.83-1.36H24.84a.47.47,0,0,0-.47.48V7.05a.47.47,0,0,0,.47.48h3.38a.56.56,0,0,1,.45.22.58.58,0,0,1,.11.46,9,9,0,0,1-1.93,4,5.79,5.79,0,0,1-2.37,1.58.46.46,0,0,0-.31.34,8.32,8.32,0,0,1-.84,2.26.46.46,0,0,0,0,.5.46.46,0,0,0,.39.2h.08a9,9,0,0,0,5.27-2.83,11.8,11.8,0,0,0,2.64-5.33A3.61,3.61,0,0,0,31.05,5.85Z"/><path class="cls-2" d="M27,12.28V12l-.15.16a5.79,5.79,0,0,1-2.37,1.58.46.46,0,0,0-.31.34,8.32,8.32,0,0,1-.84,2.26.46.46,0,0,0,0,.5.46.46,0,0,0,.39.2h.08a10,10,0,0,0,2.22-.65A9.45,9.45,0,0,0,27,12.28Z"/><path class="cls-2" d="M24.37,5V7.05a.47.47,0,0,0,.47.48H27v-3H24.84A.47.47,0,0,0,24.37,5Z"/><path class="cls-3" d="M19.5,28.05c-.14-.11-1.42-1.18-1.58-7a.49.49,0,0,0-.17-.36.54.54,0,0,0-.39-.1,8.66,8.66,0,0,1-1.44.13h0a8.69,8.69,0,0,1-1.45-.13.54.54,0,0,0-.39.1.49.49,0,0,0-.17.36c-.16,5.8-1.44,6.87-1.58,7a.44.44,0,0,0-.32.5.51.51,0,0,0,.5.42h6.81a.51.51,0,0,0,.5-.42A.44.44,0,0,0,19.5,28.05Z"/><path class="cls-4" d="M19.5,28.05c-.14-.11-1.42-1.18-1.58-7a.49.49,0,0,0-.17-.36.54.54,0,0,0-.39-.1,8.66,8.66,0,0,1-1.44.13h0l-.46,0a.48.48,0,0,1,.16.35c.16,5.8,1.43,6.87,1.58,7a.44.44,0,0,1,.32.5A.51.51,0,0,1,17,29h2.31a.51.51,0,0,0,.5-.42A.44.44,0,0,0,19.5,28.05Z"/><path class="cls-1" d="M.79,5.85h0A3.58,3.58,0,0,1,3.61,4.49H7A.47.47,0,0,1,7.46,5V7.05A.47.47,0,0,1,7,7.53H3.61a.56.56,0,0,0-.45.22.58.58,0,0,0-.11.46,9,9,0,0,0,1.93,4,5.79,5.79,0,0,0,2.37,1.58.46.46,0,0,1,.31.34,8.32,8.32,0,0,0,.84,2.26.46.46,0,0,1,0,.5.46.46,0,0,1-.39.2H8a9,9,0,0,1-5.27-2.83A11.8,11.8,0,0,1,.09,8.89,3.58,3.58,0,0,1,.79,5.85Z"/><path class="cls-2" d="M4.83,12.28V12l.15.16a5.79,5.79,0,0,0,2.37,1.58.46.46,0,0,1,.31.34,8.32,8.32,0,0,0,.84,2.26.46.46,0,0,1,0,.5.46.46,0,0,1-.39.2H8a10.16,10.16,0,0,1-2.22-.65A9.45,9.45,0,0,1,4.83,12.28Z"/><path class="cls-2" d="M7.46,5V7.05A.47.47,0,0,1,7,7.53H4.83v-3H7A.47.47,0,0,1,7.46,5Z"/><path class="cls-5" d="M24.84,2.76H7a.47.47,0,0,0-.48.48v9a9.41,9.41,0,1,0,18.81,0v-9A.47.47,0,0,0,24.84,2.76Z"/><path class="cls-6" d="M24.84,2.76H22.62a.47.47,0,0,1,.47.48v9a9.41,9.41,0,0,1-8.29,9.34,8.32,8.32,0,0,0,1.12.07,9.42,9.42,0,0,0,9.4-9.41v-9A.47.47,0,0,0,24.84,2.76Z"/><path class="cls-7" d="M20.06,11.17a1.05,1.05,0,0,0,.27-1.08,1,1,0,0,0-.85-.71l-1.76-.26a.08.08,0,0,1-.07,0l-.79-1.6a1,1,0,0,0-.94-.58h0a1,1,0,0,0-.95.58l-.79,1.6a.08.08,0,0,1-.07,0l-1.76.26a1,1,0,0,0-.85.71,1.05,1.05,0,0,0,.27,1.08L13,12.41a.1.1,0,0,1,0,.09l-.3,1.75a1.05,1.05,0,0,0,1.53,1.11l1.57-.83H16l1.57.83a1.11,1.11,0,0,0,.49.12,1.07,1.07,0,0,0,.62-.2,1,1,0,0,0,.42-1l-.3-1.75a.14.14,0,0,1,0-.09Z"/><path class="cls-8" d="M19.48,9.38,19,9.31,16.74,11.5a.57.57,0,0,0-.17.51l.52,3.11.44.24a1.11,1.11,0,0,0,.49.12,1.07,1.07,0,0,0,.62-.2,1,1,0,0,0,.42-1l-.3-1.75a.14.14,0,0,1,0-.09l1.27-1.24a1.05,1.05,0,0,0,.27-1.08A1,1,0,0,0,19.48,9.38Z"/><path class="cls-5" d="M25.12,31.89A5.14,5.14,0,0,0,20.43,28h-9a5.14,5.14,0,0,0-4.69,3.88.47.47,0,0,0,.07.43.49.49,0,0,0,.39.2h17.5a.48.48,0,0,0,.38-.2A.47.47,0,0,0,25.12,31.89Z"/><path class="cls-6" d="M25.12,31.89A5.14,5.14,0,0,0,20.43,28H16.77a5.14,5.14,0,0,1,4.69,3.88.5.5,0,0,1-.07.43.49.49,0,0,1-.39.2h3.67a.48.48,0,0,0,.38-.2A.47.47,0,0,0,25.12,31.89Z"/><path class="cls-1" d="M25.62,0H6.21a1.86,1.86,0,0,0,0,3.71H25.62a1.86,1.86,0,0,0,0-3.71Z"/><path class="cls-2" d="M25.62,0H23.46a1.86,1.86,0,1,1,0,3.71h2.16a1.86,1.86,0,0,0,0-3.71Z"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -0,0 +1,215 @@
|
||||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
|
||||
*
|
||||
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
|
||||
* copy, modify, and distribute this software in source code or binary form for use
|
||||
* in connection with the web services and APIs provided by Facebook.
|
||||
*
|
||||
* As with any software that integrates with the Facebook platform, your use of
|
||||
* this software is subject to the Facebook Platform Policy
|
||||
* [http://developers.facebook.com/policy/]. This copyright notice shall be
|
||||
* included in all copies or substantial portions of the software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},i(e)}function l(e,t,n){return t=d(t),s(e,c()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function s(e,t){if(t&&(i(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function u(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function m(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function g(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){return S(e)||v(e,t)||C(e,t)||y()}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){if(e){if(typeof e=="string")return b(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(n!=null){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function S(e){if(Array.isArray(e))return e}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R(Object(n),!0).forEach(function(t){E(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function E(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=I(e,"string");return i(t)=="symbol"?t:t+""}function I(e,t){if(i(e)!="object"||!e)return e;var n=e[typeof Symbol=="function"?Symbol.toPrimitive:"@@toPrimitive"];if(n!==void 0){var r=n.call(e,t||"default");if(i(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsCollapseUserData",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},a=o.exports;return(function(){"use strict";function e(e,t){if(e==null)return null;var n=Object.keys(e).some(function(n){return Object.prototype.hasOwnProperty.call(t,n)&&e[n]!==t[n]});return n?null:L(L({},e),t)}o.exports=e})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsExtractEventPayload",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsEvents"),n=e.getIWLParameters,r=a.getFbeventsModules("signalsFBEventsExtractFromInputs"),i=a.getFbeventsModules("signalsFBEventsExtractPageFeatures");function l(e){var o=e.button,a=e.buttonFeatures,l=e.buttonText,s=e.form,u=e.pixel,c=e.shouldExtractUserData,d=c&&s==null,m=r({button:o,containerElement:d?t:s,shouldExtractUserData:c}),p=i(),_=m.formFieldFeatures,f=m.userData,g=m.alternateUserData,h=m.rawCensoredUserData,y={buttonFeatures:a,buttonText:l,formFeatures:d?[]:_,pageFeatures:p,parameters:n.trigger({pixel:u,target:o})[0]};return[y,f,g,h]}o.exports=l})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsExtractFormFieldFeatures",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsPixelPIIUtils"),t=e.extractPIIFields;function n(e,n){var r={id:e.id,name:e.name,tag:e.tagName.toLowerCase()},o={},a={},i={};if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.placeholder!==""&&(r.placeholder=e.placeholder),r.tag==="input"&&(r.inputType=e.getAttribute("type"),n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))){var l=t(r,e);l!=null&&(o=l.normalized,a=l.rawCensored,i=l.alternateNormalized)}return!(e instanceof HTMLButtonElement)&&e.value===""&&(r.valueMeaning="empty"),[r,o,i,a]}o.exports=n})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsExtractFromInputs",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsFeatureCounter"),t=a.getFbeventsModules("signalsFBEventsCollapseUserData"),n=a.getFbeventsModules("signalsFBEventsExtractFormFieldFeatures"),r=15,i="input,textarea,select,button";function l(o){var a=o.button,l=o.containerElement,s=o.shouldExtractUserData,u=new e,c=[],d={},m={},p={};if(l==null)return{formFieldFeatures:c,userData:d,alternateUserData:m,rawCensoredUserData:p};for(var _=l.querySelectorAll(i),f=0;f<_.length;f++){var g=_[f];if(g instanceof HTMLInputElement||g instanceof HTMLTextAreaElement||g instanceof HTMLSelectElement||g instanceof HTMLButtonElement){var y="".concat(g.tagName).concat(g.type===void 0?"":g.type),C=u.incrementAndGet(y);if(C>r||g===a)continue;var b=n(g,s&&d!=null),v=h(b,4),S=v[0],R=v[1],L=v[2],E=v[3];S!=null&&c.push(S),d=t(d,R),p=t(p,E),m=t(m,L)}}return{formFieldFeatures:c,userData:d,alternateUserData:m,rawCensoredUserData:p}}o.exports=l})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsExtractPageFeatures",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsShared"),n=e.unicodeSafeTruncate,r=500;function i(){var e=t.querySelector("title"),o=n(e&&e.text,r);return{title:o}}o.exports=i})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsFeatureCounter",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},a=o.exports;return(function(){"use strict";var e=(function(){function e(){_(this,e),E(this,"_features",{})}return g(e,[{key:"incrementAndGet",value:function(t){return this._features[t]==null&&(this._features[t]=0),this._features[t]++,this._features[t]}}])})();o.exports=e})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsMakeSafeString",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsUtils"),t=e.each,n=/[^\s\"]/,r=/[^\s:+\"]/;function i(e,t,o){return o==null?n.test(t)?t==="@"?null:{start:e,userOrDomain:"user"}:null:t==="@"?o.userOrDomain==="domain"?null:L(L({},o),{},{userOrDomain:"domain"}):t==="."?o.userOrDomain==="domain"&&o.lastDotIndex===e-1?null:L(L({},o),{},{lastDotIndex:e}):o.userOrDomain==="domain"&&r.test(t)===!1||o.userOrDomain==="user"&&n.test(t)===!1?o.lastDotIndex===e-1?null:L(L({},o),{},{end:e-1}):o}function l(e,t){return e.userOrDomain==="domain"&&e.lastDotIndex!=null&&e.lastDotIndex!==t-1&&e.start!=null&&e.end!=null&&e.end!==e.lastDotIndex}function s(e){for(var n=null,r=e,o=[],a=0;a<r.length;a++)n=i(a,r[a],n),n!=null&&(l(n,r.length)?o.push(n):a===r.length-1&&(n.end=a,l(n,r.length)&&o.push(n)),n.end!=null&&(n=null));return t(o.reverse(),function(e){var t=e.start,n=e.end;n!=null&&(r=r.slice(0,t)+"@"+r.slice(n+1))}),r}var u=/[\d]+(\.[\d]+)?/g;function c(e){for(var t=e;/\d\.\d/.test(t);)t=t.replace(u,"0");return t=t.replace(u,"0"),t}function d(e){return{safe:c(s(e))}}o.exports=d})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsThrottler",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},a=o.exports;return(function(){"use strict";var e=1e3,t=(function(){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e;_(this,t),E(this,"_lastArgs",null),E(this,"_lastTime",0),this._rateMS=n}return g(t,[{key:"_passesThrottleImpl",value:function(){var e=this._lastArgs;if(e==null)return!0;var t=Date.now(),n=t-this._lastTime;if(n>=this._rateMS||e.length!==arguments.length)return!0;for(var r=0;r<arguments.length;r++)if((r<0||arguments.length<=r?void 0:arguments[r])!==e[r])return!0;return!1}},{key:"passesThrottle",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this._passesThrottleImpl.apply(this,t);return this._lastTime=Date.now(),this._lastArgs=t,r}}])})();o.exports=t})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.inferredevents",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var n=a.getFbeventsModules("SignalsFBEventsGuardrail"),r=a.getFbeventsModules("SignalsFBEventsConfigStore"),i=a.getFbeventsModules("SignalsFBEventsQEV2"),s=a.getFbeventsModules("SignalsFBEventsExperimentNames"),u=s.BUTTON_CLICK_OPTIMIZE_EXPERIMENT_V2,c=a.getFbeventsModules("SignalsFBEventsEvents"),d=c.fired,p=c.piiConflicting,f=c.extractPii,y=a.getFbeventsModules("SignalsFBEventsShared"),C=y.signalsConvertNodeToHTMLElement,b=y.signalsExtractForm,v=y.signalsIsIWLElement,S=y.signalsExtractButtonFeatures,R=y.signalsGetTruncatedButtonText,k=y.signalsGetWrappingButton,I=a.getFbeventsModules("SignalsFBEventsPlugin"),T=a.getFbeventsModules("SignalsFBEventsThrottler"),D=a.getFbeventsModules("SignalsFBEventsUtils"),x=a.getFbeventsModules("signalsFBEventsExtractEventPayload"),$=a.getFbeventsModules("signalsFBEventsMakeSafe"),P=a.getFbeventsModules("signalsFBEventsMakeSafeString"),N=D.each,M=D.keys,w=a.getFbeventsModules("signalsFBEventsExtractFromInputs"),A=new T,F=a.getFbeventsModules("signalsFBEventsDoAutomaticMatching"),O=100;function B(e,t){return t!=null&&t.buttonSelector==="extended"}function W(e){return function(n){if(!e.disableAutoConfig){var t=n.target instanceof Node?C(n.target):null;if(t!=null){if(v(t)||!A.passesThrottle(t))return;var o=null,a=null,l=e.getOptedInPixels("InferredEvents");N(l,function(n){var o=r.get(n.id,"inferredEvents"),a=!1;o!=null&&o.disableRestrictedData!=null&&(a=o.disableRestrictedData);var l=B(n.id,o),s;s=k(t,l,!1);var c={},d=Date.now().toString();if(s==null&&(s=k(t,l,!0),s!=null&&(c=L(L({},c),{},{"ie[e]":"1"}),i.isInTest(u,d))),s!=null){var m=e.optIns.isOptedIn(n.id,"AutomaticMatching"),_=e.optIns.isOptedIn(n.id,"OpenBridge"),f=b(s),g=S(s,f),y=g?g.innerText:null,C=P(y!=null?y:R(s)).safe;if(!(C!=null&&C.length>O)){var v,E,I,T,D=m||_,$=x({button:s,buttonFeatures:g,buttonText:C,form:f,pixel:n,shouldExtractUserData:D}),N=h($,4);v=N[0],E=N[1],I=N[2],T=N[3],a&&(v={}),E==null&&p.trigger(n),m&&E!=null&&F(e,n,E,I,T||{}),_&&E!=null&&q(n,E),!(a&&(n.userDataFormFields==null||M(n.userDataFormFields).length===0)&&(n.sgwUserDataFormFields==null||M(n.sgwUserDataFormFields).length===0))&&e.trackSingleSystem("automatic",n,"SubscribedButtonClick",v,{},c,d)}}})}}}}function q(e,t){if(e.sgwUserDataFormFields==null)e.sgwUserDataFormFields=t;else for(var n in t){var r=t[n];r!=null&&typeof r=="string"&&r.trim().length>0&&e.sgwUserDataFormFields&&(e.sgwUserDataFormFields[n]=r)}}function U(e,n,r,o,a){if(!e.disableAutoConfig){var i=e.optIns.isOptedIn(n.id,"InferredEvents");if(i){var l=e.optIns.isOptedIn(n.id,"AutomaticMatching");if(l){var s=r==null,u=w({button:o,containerElement:s?t:r,shouldExtractUserData:!0}),c=u.userData,d=u.alternateUserData,m=u.rawCensoredUserData;c==null?p.trigger(n):F(e,n,c,d,m||{},a)}}}}var V=(function(e){function t(){var e;_(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e=l(this,t,[].concat(r)),E(e,"extractPII",U),e}return m(t,e),g(t)})(I);o.exports=new V(function(n,r){d.listenOnce(function(){var n=$(W(r));t.addEventListener?t.addEventListener("click",n,{capture:!0,once:!1,passive:!0}):e.attachEvent("onclick",n)}),f.listen(function(e,t,n){return U(r,e,t,n)})})})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.inferredevents"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.inferredevents",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.inferredevents",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},i(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function s(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=c(e,"string");return i(t)=="symbol"?t:t+""}function c(e,t){if(i(e)!="object"||!e)return e;var n=e[typeof Symbol=="function"?Symbol.toPrimitive:"@@toPrimitive"];if(n!==void 0){var r=n.call(e,t||"default");if(i(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t,n){return t=g(t),p(e,f()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function p(e,t){if(t&&(i(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function _(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function h(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function C(e,t){return L(e)||R(e,t)||v(e,t)||b()}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){if(e){if(typeof e=="string")return S(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}function S(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(n!=null){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function L(e){if(Array.isArray(e))return e}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("fbevents.plugins.identity",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;a.execStart=e.performance&&e.performance.now&&e.performance.now(),(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})()&&(a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("fbevents.plugins.iwlbootstrapper",function(){
|
||||
return o.exports}))})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function l(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t,n){return t=p(t),c(e,m()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function c(e,t){if(t&&(b(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function _(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function g(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){var t=y(e,"string");return b(t)=="symbol"?t:t+""}function y(e,t){if(b(e)!="object"||!e)return e;var n=e[typeof Symbol=="function"?Symbol.toPrimitive:"@@toPrimitive"];if(n!==void 0){var r=n.call(e,t||"default");if(b(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C(e,t){var n=typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=R(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(t){l=!0,a=t},f:function(){try{i||n.return==null||n.return()}finally{if(l)throw a}}}}function b(e){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},b(e)}function v(e){return E(e)||L(e)||R(e)||S()}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function R(e,t){if(e){if(typeof e=="string")return k(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}function L(e){if(typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]!=null||e["@@iterator"]!=null)return Array.from(e)}function E(e){if(Array.isArray(e))return k(e)}function k(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsFbcCombiner",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsURLUtil"),t=e.getURLParameterWithValidationCheck,n="clickID",r="fbclid";function i(e,t){var n=new Map(e.map(function(e){return[e.paramConfig.query,e]}));return t.forEach(function(e){n.has(e.paramConfig.query)||n.set(e.paramConfig.query,e)}),Array.from(n.values())}function l(e){var t="";return e.forEach(function(e){var n=e.paramValue;if(n!=null&&n!==""){var r=e.paramConfig.prefix!==""?"_".concat(e.paramConfig.prefix,"_").concat(n):"_".concat(n),o=Array.from(t.matchAll(/_([a-zA-Z_]+)_/g)).map(function(e){return e[1]}),a=o.filter(function(t){return t!==e.paramConfig.prefix}).map(function(e){return"_".concat(e,"_")}).join("|"),i=a?new RegExp("_".concat(e.paramConfig.prefix,"_.*?(?=").concat(a,"|$)")):new RegExp("_".concat(e.paramConfig.prefix,"_.*?$"));t.match(i)?t=t.replace(i,r):t===""?t=e.paramConfig.prefix!==""?"".concat(e.paramConfig.prefix,"_").concat(n):n:t+=r}}),t===""?null:t}function s(e,t){var n=i(e,t),o="",a=!1,s=v(n).sort(function(e,t){return e.paramConfig.query===r?-1:t.paramConfig.query===r?1:e.paramConfig.query.localeCompare(t.paramConfig.query)}),u=l(s);return u}function u(e,n){var o=n.params;if(o==null||o.length===0)return null;var a=new Map;if(o.forEach(function(n){var r=t(e,n.query);r!=null&&r!==""&&a.set(n.query,r)}),a.size===0)return null;var i=v(o).filter(function(e){return a.has(e.query)}).filter(function(e){return e.query===r||e.prefix!==""}).map(function(e){return{paramConfig:e,paramValue:a.get(e.query)||""}}).sort(function(e,t){return e.paramConfig.query===r?-1:t.paramConfig.query===r?1:e.paramConfig.query.localeCompare(t.paramConfig.query)}),s=l(i);return s}o.exports={combineFbcParamsFromUrlAndEBP:s,combineFbcParamsFromUrl:u,getUniqueFbcParamConfigAndValue:i,constructFbcFromSortedParamValues:l}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsGetIsSafariOrMobileSafari",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},a=o.exports;return(function(){"use strict";function t(){var t=e.navigator;return t.userAgent.indexOf("Safari")!==-1&&t.userAgent.indexOf("Chrome")===-1}function n(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e.navigator.userAgent)}function r(){var t=e.navigator.userAgent.match(/OS (\d+)_(\d+)_?(\d+)?/);if(t==null||t.length<2)return!1;var n=[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||0,10)];return!(n[0]<14||n[0]===14&&n[1]<5)}function a(){return t()&&n()&&r()}o.exports={getIsMobileSafari:a,getIsSafari:t}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsIsHostFacebook",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},a=o.exports;return(function(){"use strict";o.exports=function(t){if(typeof t!="string")return!1;var e=t.match(/^(.*\.)*(facebook\.com|internalfb\.com|workplace\.com|instagram\.com|oculus\.com|novi\.com)\.?$/i);return e!==null}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsLocalStorageTypedef",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsTyped"),t=e.Typed,n=t.objectWithFields({setItem:t.func(),getItem:t.func()});o.exports=n})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsLocalStorageUtils",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var t=a.getFbeventsModules("SignalsFBEventsLocalStorageTypedef"),n=a.getFbeventsModules("SignalsFBEventsTyped"),r=n.coerce;function i(t,n){e.localStorage.setItem(t,n)}function l(t){return e.localStorage.getItem(t)}function s(t){e.localStorage.removeItem(t)}function u(){var n=null;try{n=r(e.localStorage,t)}catch(e){return!1}return n!=null}function c(e){var t=e.trim().toLowerCase();if(t.length===0)return!1;var n=["true","false","null","undefined","0","1"];return!n.includes(t)}function d(e){if(e==null)return null;var t=String(e);if(t.length===0||!c(t))return null;try{var n=JSON.parse(t);if(Array.isArray(n)&&n.length>0){var r=n.filter(function(e){return typeof e=="string"&&c(e)}).join(",");return r.length>0?r:null}else if(b(n)==="object"&&n!==null){var o=Object.values(n).filter(function(e){return typeof e=="string"&&c(e)}).join(",");return o.length>0?o:null}}catch(e){return t}return t}function m(e){for(var t=[/event/i,/click/i,/sent/i,/tracking/i,/analytics/i,/log/i,/flag/i,/toggle/i,/enabled/i,/disabled/i],n=0,r=t;n<r.length;n++){var o=r[n];if(o.test(e))return!0}return!1}function p(){if(!u())return null;try{for(var t=[/(last|recent).*search/i,/search.*(history|keyword)/i,/^search$/i],n=e.localStorage,r=[],o=0;o<n.length;o++){var a=n.key(o);if(a!=null&&!m(a)){var i=C(t),s;try{for(i.s();!(s=i.n()).done;){var c=s.value;if(c.test(a)){r.push(a);break}}}catch(e){i.e(e)}finally{i.f()}}}for(var p=0,_=r;p<_.length;p++){var f=_[p],g=l(f),h=d(g);if(h!=null)return h}}catch(e){return null}}o.exports={setLocalStorageItem:i,getLocalStorageItem:l,removeLocalStorageItem:s,isLocalStorageSupported:u,getSearchHistoryKeywords:p}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsShouldNotDropCookie",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var t=a.getFbeventsModules("signalsFBEventsIsHostFacebook"),n="FirstPartyCookies";o.exports=function(o,a){return e.location.protocol.substring(0,4)!=="http"||t(e.location.hostname)||a.disableFirstPartyCookies||a.getOptedInPixels(n).indexOf(o)===-1}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsURLUtil",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var n=a.getFbeventsModules("SignalsFBEventsGuardrail"),r=a.getFbeventsModules("SignalsFBEventsLogging"),i=r.logWarning,l=["javascript"];function s(e,t){var r=new RegExp("[?#&]"+t.replace(/[\[\]]/g,"\\$&")+"(=([^&#]*)|&|#|$)"),o=r.exec(e);if(!o)return null;if(!o[2])return"";var a=n.eval("fix_fbevent_uri_error");if(a)try{return decodeURIComponent(o[2].replace(/\+/g," "))}catch(e){return i(e,"pixel","URLUtil"),o[2].replace(/\+/g," ")}else return decodeURIComponent(o[2].replace(/\+/g," "))}function u(e,t){var n=s(e,t);if(n!=null){var r=!0,o=n.toLowerCase();return l.forEach(function(e){o.includes(e)&&(r=!1)}),r?n:null}}function c(n){var r=null;return r=s(e.location.href,n),r!=null||(r=s(t.referrer,n)),r}o.exports={getURLParameter:s,getURLParameterWithValidationCheck:u,maybeGetParamFromUrlForEbp:c}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.cookie",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var n=a.getFbeventsModules("SignalsFBEventsEvents"),r=n.configLoaded,i=a.getFbeventsModules("SignalsFBEventsEvents"),c=i.getCustomParameters,d=i.getClickIDFromBrowserProperties,m=i.setEventId,p=a.getFbeventsModules("SignalsFBEventsPixelCookie"),f=a.getFbeventsModules("SignalsFBEventsPlugin"),h=a.getFbeventsModules("SignalsFBEventsURLUtil"),y=h.getURLParameterWithValidationCheck,C=a.getFbeventsModules("SignalsFBEventsFbcCombiner"),b=C.combineFbcParamsFromUrl,S=a.getFbeventsModules("signalsFBEventsShouldNotDropCookie"),R=a.getFbeventsModules("SignalsPixelCookieUtils"),L=R.readPackedCookie,E=R.writeNewCookie,k=R.writeExistingCookie,I=R.CLICK_ID_PARAMETER,T=R.CLICKTHROUGH_COOKIE_NAME,D=R.CLICKTHROUGH_COOKIE_PARAM,x=R.DOMAIN_SCOPED_BROWSER_ID_COOKIE_NAME,$=R.DOMAIN_SCOPED_BROWSER_ID_COOKIE_PARAM,P=R.DEFAULT_FBC_PARAM_CONFIG,N=R.DEFAULT_ENABLE_FBC_PARAM_SPLIT,M=R.MULTI_CLICKTHROUGH_COOKIE_PARAM,w=R.NINETY_DAYS_IN_MS,A=a.getFbeventsModules("SignalsFBEventsLocalStorageUtils"),F=A.getLocalStorageItem,O=A.setLocalStorageItem,B=A.isLocalStorageSupported,W=a.getFbeventsModules("signalsFBEventsGetIsSafariOrMobileSafari"),q=W.getIsSafari,U=a.getFbeventsModules("SignalsFBEventsLogging"),V=U.logWarning,H=a.getFbeventsModules("signalsFBEventsFeatureGate"),G="_fbleid",z="fbleid",j=a.getFbeventsModules("SignalsParamList"),K=10080*60*1e3,Q=999999999,X="multiFbc",Y=",",J=["javascript"];function Z(){var e=Math.floor(Math.random()*Q),t=Math.floor(Math.random()*Q);return e.toString()+t.toString()}function ee(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.location.href,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=y(n,I);if((o==null||o.trim()=="")&&(o=y(t.referrer,I)),(o==null||o.trim()=="")&&(o=r),o!=null&&o.length>500)return null;var a=L(T);return o!=null&&o.trim()!=""?a?(a.maybeUpdatePayload(o),k(T,a)):E(T,o):a?k(T,a):null}function te(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.location.href,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2?arguments[2]:void 0,a=r;if((a==null||a.trim()=="")&&(a=b(n,o),(a==null||a.trim()=="")&&(a=b(t.referrer,o))),a!=null&&a.length>500)return null;var i=L(T);return a!=null&&a.trim()!=""?i?(i.maybeUpdatePayload(a),k(T,i)):E(T,a):i?k(T,i):null}function ne(e,t){try{if(!B())return;var n=F(X);if(n==null?n="":n=String(n),n.includes(e))return n;var r=Date.now();r=typeof r=="number"?r:new Date().getTime();var o=n.split(",").slice(0,t-1).map(function(e){return p.unpack(e)}).filter(function(e){return e!=null&&e.creationTime!=null&&r-e.creationTime<w}).map(function(e){return e&&e.pack()}).filter(function(e){return e!=null&&e!==""}),a=[e].concat(v(o)).join(",");return O(X,a),a}catch(e){var i=e instanceof Error?e.message:String(e),l=new Error("[Multi Fbc Error] Error in adding multi fbc: "+i);e instanceof Error&&e.stack!=null&&(l.stack=e.stack),V(l,"pixel","cookie")}}function re(){var e=L(x);if(e)return k(x,e),e;var t=Z();return E(x,t)}var oe=(function(e){function t(){var e;s(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e=u(this,t,[].concat(r)),g(e,"dropOrRefreshClickIDCookie",ee),g(e,"dropOrRefreshDomainScopedBrowserIDCookie",re),g(e,"dropOrRefreshFbcCookie",te),g(e,"addToMultiFbcQueue",ne),e}return _(t,e),l(t)})(f);o.exports=new oe(function(t,n){var o=null;d.listen(function(e){o=e});var a=P,i=N,l=N,s=N,u=0,m=!1;r.listen(function(t){var r=n.getPixel(t);if(r!=null){var c=n.pluginConfig.get(r.id,"cookie");if(c!=null&&c.fbcParamsConfig!=null&&(a=c.fbcParamsConfig),l=c!=null&&c.enableFbcParamSplitAll!=null?c.enableFbcParamSplitAll:N,s=c!=null&&c.enableFbcParamSplitSafariOnly!=null?c.enableFbcParamSplitSafariOnly:N,i=q()?s:l,c!=null&&c.maxMultiFbcQueueSize!=null&&(u=c.maxMultiFbcQueueSize,m=u>0),!S(r,n)){var d=ee(e.location.href,o);d!=null&&m&&ne(d.pack(),u)}}});function p(){c.listen(function(t,r,l,s,c){if(S(t,n))return{};var d={},p=ee(e.location.href,o),_=te(e.location.href,o,a);if(i&&_){var f=_.pack();if(d[D]=f,m){var g=ne(_.pack(),u)||f;d[M]=g}}else if(p){var h=p.pack();if(d[D]=p.pack(),m){var y=ne(p.pack(),u)||h;d[M]=y}}var C=re();if(C){var b=C.pack();d[$]=b}if(H("offsite_clo_beta_event_id_coverage",t.id)&&r!=="Lead"){var v=L(G);v!=null&&v.payload!=null&&(d.oed={event_id:v.payload})}return d})}p()})})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.cookie"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.cookie",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.cookie",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},i(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=d(e,"string");return i(t)=="symbol"?t:t+""}function d(e,t){if(i(e)!="object"||!e)return e;var n=e[typeof Symbol=="function"?Symbol.toPrimitive:"@@toPrimitive"];if(n!==void 0){var r=n.call(e,t||"default");if(i(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBevents.plugins.automaticmatchingforpartnerintegrations",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var t=a.getFbeventsModules("SignalsFBEventsConfigStore"),n=a.getFbeventsModules("SignalsFBEventsEvents"),r=n.configLoaded,i=n.piiAutomatched,l=a.getFbeventsModules("SignalsFBEventsPlugin"),u=a.getFbeventsModules("SignalsFBEventsUtils"),c=u.idx,d=u.isEmptyObject,m=u.keys,p=u.reduce,_=a.getFbeventsModules("SignalsPixelPIIUtils"),f=_.getNormalizedPIIValue;function g(){return c(e,function(e){return e.Shopify.checkout})!=null}var h={ct:function(){return c(e,function(e){return e.Shopify.checkout.billing_address.city})},em:function(){return c(e,function(e){return e.Shopify.checkout.email})},fn:function(){return c(e,function(e){return e.Shopify.checkout.billing_address.first_name})},ln:function(){return c(e,function(e){return e.Shopify.checkout.billing_address.last_name})},ph:function(){return c(e,function(e){return e.Shopify.checkout.billing_address.phone})},st:function(){return c(e,function(e){return e.Shopify.checkout.billing_address.province_code})},zp:function(){return c(e,function(e){return e.Shopify.checkout.billing_address.zip})}};function y(e){return g()?p(e,function(e,t){var n=h[t],r=n!=null?n():null,o=r!=null&&r!==""?f(t,r):null;return o!=null&&(e[t]=o),e},{}):null}o.exports=new l(function(e,n){r.listen(function(e){if(e!=null){var r=n.optIns.isOptedIn(e,"AutomaticMatching"),o=n.optIns.isOptedIn(e,"AutomaticMatchingForPartnerIntegrations"),a=r&&o;if(a){var l=n.getPixel(e);if(l!=null){var u=t.get(l.id,"automaticMatching");if(u!=null){var c=y(u.selectedMatchKeys);c==null||d(c)||(l.userDataFormFields=s(s({},l.userDataFormFields),c),i.trigger(l))}}}}})})})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBevents.plugins.automaticmatchingforpartnerintegrations"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.automaticmatchingforpartnerintegrations",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.automaticmatchingforpartnerintegrations",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;a.execStart=e.performance&&e.performance.now&&e.performance.now(),(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})()&&(a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.prohibitedsources",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var t=a.getFbeventsModules("SignalsFBEventsConfigStore"),n=a.getFbeventsModules("SignalsFBEventsEvents"),r=n.configLoaded,i=a.getFbeventsModules("SignalsFBEventsLogging"),l=a.getFbeventsModules("SignalsFBEventsPlugin"),s=a.getFbeventsModules("SignalsFBEventsUtils"),u=s.filter,c=a.getFbeventsModules("sha256_with_dependencies_new");o.exports=new l(function(n,o){r.listen(function(n){var r=o.optIns.isOptedIn(n,"ProhibitedSources");if(r){var a=o.getPixel(n);if(a!=null){var l=t.get(a.id,"prohibitedSources");if(l!=null){var s=u(l.prohibitedSources,function(t){return t.domain!=null&&t.domain===c(e.location.hostname)}).length>0;s&&(o.locks.lock("prohibited_sources_".concat(n)),i.consoleWarn("[fbpixel] "+a.id+" is unavailable. Go to Events Manager to learn more"))}}}})})})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.prohibitedsources"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.prohibitedsources",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.prohibitedsources",function(){
|
||||
return o.exports}))})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;a.execStart=e.performance&&e.performance.now&&e.performance.now(),(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})()&&(a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("fbevents.plugins.unwanteddata",function(){
|
||||
return o.exports}))})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e,t){var n=typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(t){s=!0,a=t},f:function(){try{i||n.return==null||n.return()}finally{if(s)throw a}}}}function l(e,t){if(e){if(typeof e=="string")return s(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},u(e)}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.iabpcmaebridge",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var n=a.getFbeventsModules("SignalsFBEventsEvents"),r=n.fired,i=n.setEventId,l=n.getCustomParameters,s=a.getFbeventsModules("SignalsFBEventsPlugin"),u=a.getFbeventsModules("SignalsParamList"),c=a.getFbeventsModules("signalsFBEventsGetIsIosInAppBrowser"),d=a.getFbeventsModules("signalsFBEventsGetIsAndroidIAW"),m=a.getFbeventsModules("SignalsFBEventsConfigStore"),p=a.getFbeventsModules("SignalsFBEventsGuardrail"),_=a.getFbeventsModules("sha256_with_dependencies_new"),f=a.getFbeventsModules("SignalsFBEventsLocalStorageUtils"),g=f.getSearchHistoryKeywords;function h(e){return(typeof e=="string"||e instanceof String)&&e.toUpperCase()==="LDU"}function y(e){try{if(e==null||typeof e!="string")return null;var t=JSON.parse(e);return t.conversionBit!=null&&typeof t.conversionBit=="number"&&t.priority!=null&&typeof t.priority=="number"&&t.etldOne!=null&&typeof t.etldOne=="string"?e:JSON.stringify({conversionBit:-1,priority:-1,etldOne:""})}catch(e){return null}}function C(e){if(e==null)return!1;var t=m.get(e,"IABPCMAEBridge");return!(t==null||t.enableAutoEventId==null||!t.enableAutoEventId)}o.exports=new s(function(n,o){!c()&&!d(null,null)||(l.listen(function(e,t){return C(e.id)?{iab:1}:{}}),i.listen(function(t,n){if(C(t)){var r="".concat(e.location.origin,"_").concat(Date.now(),"_").concat(Math.random()),o=_(r),a=n.get("eid");if(p.eval("multi_eid_fix",t)&&(a==null||a==="")&&(a=n.getEventId()),!(a!=null&&a!==""||o==null)){n.append("apcm_eid","1");var i="pcm_plugin-set_".concat(o);n.append("eid",i)}}}),r.listen(function(n,r){if(c()){var o=r.get("id"),a=r.get("ev"),i={},l=r.get("dpo"),s=r.get("dpoco"),u=r.get("dpost"),d=r.get("coo"),m=r.get("es"),_=r.getEventId(),f=r.get("apcm_eid"),C=r.get("iab"),b=y(r.get("aem")),v=p.eval("get_keywords_from_local_storage",o);if(v){var S=g();S!=null&&S.length>0&&r.append("lspk",S)}var R=!1;if((d==="false"||d==="true")&&(i.coo=d),m!==null&&(i.es=m),t!==null&&t.referrer!==null&&(i.referrer_link=t.referrer),h(l)){if(s==="1"&&u==="1000")return;s==="0"&&u==="0"&&(R=!0)}var L={id:o,ev:a,dpo:R,aem:b!=null?b:""},E=["eid","apcm_eid","iab","lspk"],k={};r.each(function(e,t){if(e){var n=e.match(/^cd\[(.+)\]$/);n?i[n[1]]=t:E.includes(e)&&(k[e]=t)}}),i.cd_extra=JSON.stringify(k),L.cd=JSON.stringify(i);var I={pcmPixelPostMessageEvent:L};e.postMessage(I,"*")}}))})})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.iabpcmaebridge"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.iabpcmaebridge",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.iabpcmaebridge",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e,t){var n=typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=R(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(t){l=!0,a=t},f:function(){try{i||n.return==null||n.return()}finally{if(l)throw a}}}}function l(e){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},l(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t,n){return t=f(t),m(e,_()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function m(e,t){if(t&&(l(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function g(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){var t=b(e,"string");return l(t)=="symbol"?t:t+""}function b(e,t){if(l(e)!="object"||!e)return e;var n=e[typeof Symbol=="function"?Symbol.toPrimitive:"@@toPrimitive"];if(n!==void 0){var r=n.call(e,t||"default");if(l(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function v(e){return E(e)||L(e)||R(e)||S()}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function R(e,t){if(e){if(typeof e=="string")return k(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}function L(e){if(typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]!=null||e["@@iterator"]!=null)return Array.from(e)}function E(e){if(Array.isArray(e))return k(e)}function k(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsBrowserPropertiesTypedef",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsTyped"),t=e.coerce,n=e.Typed,r=n.objectWithFields({open:n.func()});o.exports={XMLHttpRequestPrototypeTypedef:r}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.browserproperties",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var t=a.getFbeventsModules("SignalsFBEventsEvents"),n=t.configLoaded,r=a.getFbeventsModules("SignalsFBEventsEvents"),i=r.getClickIDFromBrowserProperties,l=a.getFbeventsModules("signalsFBEventsGetIsAndroidIAW"),s=a.getFbeventsModules("SignalsFBEventsLogging"),u=s.logWarning,c=a.getFbeventsModules("SignalsFBEventsPlugin"),d=a.getFbeventsModules("signalsFBEventsShouldNotDropCookie"),m=a.getFbeventsModules("SignalsFBEventsURLUtil"),p=m.maybeGetParamFromUrlForEbp,_=a.getFbeventsModules("SignalsParamList"),f=a.getFbeventsModules("SignalsFBEventsBrowserPropertiesTypedef"),g=f.XMLHttpRequestPrototypeTypedef,h=a.getFbeventsModules("SignalsFBEventsTyped"),y=h.coerce,C=a.getFbeventsModules("SignalsFBEventsFbcCombiner"),b=C.combineFbcParamsFromUrlAndEBP,v=a.getFbeventsModules("SignalsPixelCookieUtils"),S=v.CLICK_ID_PARAMETER,R=v.CLICKTHROUGH_COOKIE_PARAM,L=a.getFbeventsModules("SignalsFBEvents.plugins.cookie"),E=L.dropOrRefreshClickIDCookie,k=L.dropOrRefreshFbcCookie,I=[{prefix:"",query:"fbclid",ebp_path:"clickID"}],T={params:I},D=!1,x=T,$=D,P=D,N="browserProperties",M="pixel",w="browserProperties";function A(t,n,r){if(!(t==null||t==="")){var o=String(t);i.trigger(o);var a=n.id;if(!(a==null||o==null)){var l=r.getPixel(a.toString());if(l!=null){var s=d(l,r);if(!s){var u=n.customParams||new _,c=u.get(R);if(!(c!=null&&c!=="")){var m=E(e.location.href,o);m!=null&&(u.append(R,m.pack()),n.customParams=u)}}}}}}function F(t,n,r){if(!(t==null||t==="")){var o=String(t);i.trigger(o);var a=n.id;if(!(a==null||o==null)){var l=r.getPixel(a.toString());if(l!=null){var s=d(l,r);if(!s){var u=n.customParams||new _,c=u.get(R),m=k(e.location.href,o,x);m!=null&&(c==null||c===""?u.append(R,m.pack()):u.replaceEntry(R,m.pack()),n.customParams=u)}}}}}function O(t){var n=new Promise(function(n,r){var o=new e.XMLHttpRequest;o.onloadend=function(){if(o.readyState===o.DONE&&o.status>=200&&o.status<300){var e=t.asyncParamFetchers.get(N);e!=null&&e.result==null&&(e.result=o.responseText,t.asyncParamFetchers.set(N,e)),n(o.responseText)}else{var a=new Error("[EBP Error] Android, status="+o.status+", responseText="+o.responseText);u(a,M,w),r(a)}};try{var a=y(XMLHttpRequest.prototype,g);if(a!=null&&!a.open.toString().includes("native code")){var i=new Error("[EBP Error] XMLHttpRequest.prototype.open is overridden ");u(i,M,w),r(i)}o.open("GET","properties://browser/clickID"),o.send()}catch(e){var l=new Error("[EBP Error] XMLHttpRequest.prototype.open call failed");u(l,M,w),r(l)}});t.asyncParamFetchers.set(N,{request:n,callback:A}),t.asyncParamPromisesAllSettled=!1}function B(t,n,r){var o=new Promise(function(t,o){var a=[],i=[];n.forEach(function(t){var n=t.ebp_path;if(n!==""){var r=new Promise(function(r,o){var i=new e.XMLHttpRequest;i.onloadend=function(){if(i.readyState===i.DONE&&i.status>=200&&i.status<300)a.push({paramConfig:t,paramValue:i.responseText}),r(i.responseText);else{var e=new Error("[EBP Error], status="+i.status+", responseText="+i.responseText);u(e,M,w),o(e)}};try{var l=y(XMLHttpRequest.prototype,g);if(l!=null&&!l.open.toString().includes("native code")){var s=new Error("[EBP Error] XMLHttpRequest.prototype.open is overridden ");u(s,M,w),o(s)}}catch(e){u(e,M,w),o(e)}i.open("GET","properties://browser/"+n),i.send()});i.push(r)}}),Promise.allSettled(i).then(function(){var e=b(r,a);t(e)})});t.asyncParamFetchers.set(N,{request:o,callback:F}),t.asyncParamPromisesAllSettled=!1}function W(t){var n=e.webkit.messageHandlers.browserProperties.postMessage("clickID");n.then(function(e){var n=t.asyncParamFetchers.get(N);return n!=null&&n.result==null&&(n.result=e,t.asyncParamFetchers.set(N,n)),e}).catch(function(e){e.message="[EBP Error] Fetch error"+e.message,u(e,M,w)}),t.asyncParamFetchers.set(N,{request:n,callback:A}),t.asyncParamPromisesAllSettled=!1}function q(t,n,r){var o=[],a=[],i=new Promise(function(i,l){n.forEach(function(t){var n=t.ebp_path;if(n!==""){var r=e.webkit.messageHandlers.browserProperties.postMessage(n);r.then(function(e){return o.push({paramConfig:t,paramValue:e}),e}).catch(function(e){e.message="[EBP Error]"+e.message,u(e,M,w),l(e)}),a.push(r)}}),Promise.allSettled(a).then(function(e){var n=b(r,o),a=t.asyncParamFetchers.get(N);a!=null&&a.result==null&&(a.result=n,t.asyncParamFetchers.set(N,a)),i(n)})});t.asyncParamFetchers.set(N,{request:i,callback:F}),t.asyncParamPromisesAllSettled=!1}function U(){var e=[],t=[];return x.params!=null&&x.params.forEach(function(n){var r=p(n.query);r!=null?t.push({paramConfig:n,paramValue:r}):e.push(n)}),{urlMissingParams:e,urlExistingParams:t}}o.exports=new c(function(t,r){if(!(typeof Promise=="undefined"||Promise.toString().indexOf("[native code]")===-1)){var o=e.webkit!=null&&e.webkit.messageHandlers!=null&&e.webkit.messageHandlers.browserProperties!=null,a=l(397,264)&&typeof e.XMLHttpRequest!="undefined";if(!(!o&&!a)){var i=200,s=null,u=null,c=[],d=[];n.listen(function(e){var t=r.getPixel(e);if(t!=null){vaLine truncated
|
||||
,a.ensureModuleRegistered("fbevents.plugins.browserproperties",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;a.execStart=e.performance&&e.performance.now&&e.performance.now(),(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})()&&(a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("fbevents.plugins.eventvalidation",function(){
|
||||
return o.exports}))})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e,t){var n=typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(t){s=!0,a=t},f:function(){try{i||n.return==null||n.return()}finally{if(s)throw a}}}}function l(e,t){if(e){if(typeof e=="string")return s(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("fbevents.plugins.clienthint",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e,t){var n=typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(t){s=!0,a=t},f:function(){try{i||n.return==null||n.return()}finally{if(s)throw a}}}}function l(e,t){if(e){if(typeof e=="string")return s(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},u(e)}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.lastexternalreferrer",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var n=a.getFbeventsModules("SignalsFBEventsGetValidUrl"),r=a.getFbeventsModules("SignalsFBEventsEvents"),i=r.getCustomParameters,l=a.getFbeventsModules("SignalsFBEventsPlugin"),s=a.getFbeventsModules("signalsFBEventsGetIsAndroidIAW"),u=a.getFbeventsModules("signalsFBEventsGetIsIosInAppBrowser"),c=a.getFbeventsModules("SignalsFBEventsLogging"),d=c.logWarning,m=a.getFbeventsModules("SignalsFBEventsLocalStorageUtils"),p=m.getLocalStorageItem,_=m.removeLocalStorageItem,f=m.setLocalStorageItem,g=m.isLocalStorageSupported;o.exports=new l(function(r,o){var a=s()&&typeof e.XMLHttpRequest!="undefined",l=u();if(a||l||!g())return;var c="facebook.com",m="instagram.com",h="lastExternalReferrer",y="lastExternalReferrerTime";function C(e,t){return e==t||e.endsWith(".".concat(t))}try{var b=p(y);b!=null&&(new Date().getTime()-Number(b))/(1e3*60*60*24)>90&&(_(y),_(h));var v=!1,S="",R=n(t.referrer);if(R!=null&&(S=R.hostname),S=="")f(h,"empty"),v=!0;else{var L=String(e.location.hostname);S!==L&&(C(S,c)?f(h,"fb"):C(S,m)?f(h,"ig"):f(h,"other"),v=!0)}v&&f(y,new Date().getTime());var E=p(h);E!=null&&E!="empty"&&E!="fb"&&E!="ig"&&(E="other"),i.listen(function(e){return{ler:E}})}catch(e){var k=e instanceof Error?e.message:String(e),I=new Error("[LastExternalReferrer Error] "+k);e instanceof Error&&e.stack!=null&&(I.stack=e.stack),d(I,"pixel","lastexternalreferrer")}})})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.lastexternalreferrer"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.lastexternalreferrer",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.lastexternalreferrer",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;a.execStart=e.performance&&e.performance.now&&e.performance.now(),(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})()&&(a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.cookiedeprecationlabel",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var t=a.getFbeventsModules("SignalsFBEventsEvents"),n=t.getCustomParameters,r=a.getFbeventsModules("SignalsFBEventsPlugin"),i=a.getFbeventsModules("SignalsParamList"),l=a.getFbeventsModules("SignalsFBEventsLogging"),s=l.logError,u=a.getFbeventsModules("signalsFBEventsGetIsChrome"),c="cdl",d="cookieDeprecationLabel",m="";function p(e,t,n){var r=t.customParams||new i;r.get(c)==null&&e!=null&&r.append(c,String(e)),t.customParams=r}o.exports=new r(function(t,r){if(u()){var o=e.navigator.cookieDeprecationLabel;if(o==null){n.listen(function(e){return{cdl:"API_unavailable"}});return}var a=o.getValue().then(function(e){if(e==null)return null;m=String(e);var t=r.asyncParamFetchers.get(d);return t!=null&&t.result==null&&(t.result=m,r.asyncParamFetchers.set(d,t)),m}).catch(function(e){e.message="[CookieDeprecationLabel Error] Fetch error"+String(e.message),s(e,"pixel","cookiedeprecationlabel")});r.asyncParamFetchers.set(d,{request:a,callback:p}),r.asyncParamPromisesAllSettled=!1}})})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.cookiedeprecationlabel"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.cookiedeprecationlabel",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.cookiedeprecationlabel",function(){
|
||||
return o.exports}))})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;a.execStart=e.performance&&e.performance.now&&e.performance.now(),(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})()&&(a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("fbevents.plugins.unwantedparams",function(){
|
||||
return o.exports}))})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;a.execStart=e.performance&&e.performance.now&&e.performance.now(),(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})()&&(a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("fbevents.plugins.standardparamchecks",function(){
|
||||
return o.exports}))})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e,t){var n=typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(t){s=!0,a=t},f:function(){try{i||n.return==null||n.return()}finally{if(s)throw a}}}}function l(e,t){if(e){if(typeof e=="string")return s(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},u(e)}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.topicsapi",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var n=a.getFbeventsModules("SignalsFBEventsNetworkConfig"),r=a.getFbeventsModules("SignalsFBEventsFiredEvent"),i=a.getFbeventsModules("SignalsParamList"),l=a.getFbeventsModules("SignalsFBEventsLocalStorageUtils"),s=l.getLocalStorageItem,u=l.setLocalStorageItem,c=l.isLocalStorageSupported,d=a.getFbeventsModules("SignalsFBEventsLogging"),m=d.logError,p=d.logWarning,_=d.logInfoString,f=a.getFbeventsModules("signalsFBEventsGetIsChrome"),g=a.getFbeventsModules("signalsFBEventsGetIsAndroidIAW"),h=a.getFbeventsModules("SignalsFBEventsPlugin"),y="topicsLastReferenceTime",C=1440*60*1e3,b=1,v="pixel",S="topicsapi";function R(e,t){Math.random()>.001||_(e,v,t)}var L=function(t){return"[Topics API][Pixel Plugin] ".concat(t)},E=function(t){var e=Number(Date.now()),n=Number(t);return e-n>=b*C},k=function(){if(!c())return!1;var e=!1;try{var t=s(y);if(t==null)return!0;e=E(t)}catch(e){var n="preObservationAction action:"+(e==null?"Unknown":e.message);return p(new Error(L(n)),v,S),!1}return e},I=function(){if(c())try{u(y,Date.now())}catch(t){var e="postObservationAction action:"+(t==null?"Unknown":t.message);p(new Error(L(e)),v,S)}},T=function(r){var t=n.TOPICS_API_ENDPOINT,o="".concat(t,"?id=").concat(r),a=e.fetch(o,{browsingTopics:!0,skipObservation:!0}).then(function(e){return R(L("observation action successful for pixel ".concat(r)),S),e}).catch(function(e){var t="observation action:"+(e==null?"Unknown":e.message);p(new Error(L(t)),v,S)})},D=new h(function(e,n){(f()||g())&&(t.featurePolicy==null||!t.featurePolicy.allowsFeature("browsing-topics")||r.listen(function(e,t){try{var n=k();if(n){var r=t.get("id");if(r==null){m(new Error(L("no pixel id found")),v,S);return}T(r)}I()}catch(e){var o="generic client-side:"+(e==null?"Unknown":e.message);p(new Error(L(o)),v,S)}}))});o.exports=D})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.topicsapi"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.topicsapi",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.topicsapi",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;a.execStart=e.performance&&e.performance.now&&e.performance.now(),(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})()&&(a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("fbevents.plugins.gating",function(){
|
||||
return o.exports}))})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e,t){var n=typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=L(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(t){l=!0,a=t},f:function(){try{i||n.return==null||n.return()}finally{if(l)throw a}}}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g(r.key),r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){d(e,t),t.add(e)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=h(e,"string");return T(t)=="symbol"?t:t+""}function h(e,t){if(T(e)!="object"||!e)return e;var n=e[typeof Symbol=="function"?Symbol.toPrimitive:"@@toPrimitive"];if(n!==void 0){var r=n.call(e,t||"default");if(T(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function y(e,t){return v(e)||b(e,t)||L(e,t)||C()}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(n!=null){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function v(e){if(Array.isArray(e))return e}function S(e){return k(e)||E(e)||L(e)||R()}function R(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(e,t){if(e){if(typeof e=="string")return I(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}function E(e){if(typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]!=null||e["@@iterator"]!=null)return Array.from(e)}function k(e){if(Array.isArray(e))return I(e)}function I(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e){"@babel/helpers - typeof";return T=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},T(e)}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsExtractMicrodataFromJsonLdV2",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsMicrodata"),n=e.Product,r=e.Offer,i=e.PriceSpecification,l=e.Microdata,s=e.AggregateRating,u=a.getFbeventsModules("SignalsFBEventsUtils"),c=u.each,d=a.getFbeventsModules("SignalsFBEventsExtractMicrodataUtils"),m=d.JSON_LD_TOTAL_LENGTH_LIMIT,p=d.SCHEMA_ORG_PRODUCT_TYPES,_=d.SCHEMA_ORG_OFFER_TYPES,f=d.SCHEMA_ORG_AGGREGATE_OFFER_TYPES,g=d.MPN_KEYS,h=d.AVAILABILITY_KEYS,y=d.PRICE_KEYS,C=d.LOW_PRICE_KEYS,b=d.CURRENCY_KEYS,v=d.ID_KEYS,S=d.OFFER_KEYS,R=d.PRICE_SPECIFICATION_KEYS,L=d.URL_KEYS,E=d.MAIN_ENTITY_KEYS,k=d.GRAPH_KEYS,I=d.HAS_VARIANT_KEYS,D=d.SKU_KEYS,x=d.PRODUCT_ID_KEYS,$=d.GTIN_KEYS,P=d.GTIN8_KEYS,N=d.GTIN12_KEYS,M=d.GTIN13_KEYS,w=d.GTIN14_KEYS,A=d.ISBN_KEYS,F=d.MIN_PRICE_KEYS,O=d.MAX_PRICE_KEYS,B=d.NAME_KEYS,W=d.DESCRIPTION_KEYS,q=d.SCHEMA_ORG_AGGREGATE_RATING_TYPES,U=d.AGGREGATE_RATING_KEYS,V=d.RATING_VALUE_KEYS,H=d.RATING_COUNT_KEYS,G=d.REVIEW_COUNT_KEYS,z=d.BEST_RATING_KEYS,j=d.WORST_RATING_KEYS,K=d.getFieldFromJsonRaw,Q=d.getFieldFromJsonAsString,X=d.addToList,Y=d.parseJsonLdText,J=d.getJsonLdType;function Z(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{handleInvalidJson:!1},n=new l,r=t.querySelectorAll('script[type="application/ld+json"]'),o=0,a=0;a<r.length;a++){var i=r[a].innerText;if(!(i==null||i===""))try{if(o+=i.length,o>m)return n;for(var s=Y(i,e.handleInvalidJson),u=0;u<s.length;u++){var c=s[u];X(s,K(c,E)),X(s,K(c,k)),X(s,K(c,I));var d=ee(c);d!=null&&n.addProduct(d)}}catch(e){n.addError(i)}}return n}function ee(e){var t=J(e),r=p.includes(t);if(!r)return null;var o=new n;return ae(e,o),oe(e,o),te(e,o),o.name=Q(e,B),o.description=Q(e,W),o}function te(e,t){var n=K(e,S);if(n==null)return t;var r=Array.isArray(n)?n:[n];c(r,function(e){var n=J(e),r=_.includes(n)||f.includes(n);if(r){var o=ne(e,t);o!=null&&t.addOffer(o)}})}function ne(e,t){var n=new r;ae(e,n),ie(e,n),n.availability=Q(e,h);var o=K(e,R);return o!=null&&(n.priceSpecification=re(o)),n}function re(e){if(e==null)return null;var t=Array.isArray(e)?e:[e],n=[];return c(t,function(e){if(!(e==null||T(e)!=="object")){var t=new i;ie(e,t),n.push(t)}}),n.length>0?n:null}function oe(e,t){var n=K(e,U);if(n!=null){var r=new s;r.ratingValue=Q(n,V),r.ratingCount=Q(n,H),r.reviewCount=Q(n,G),r.bestRating=Q(n,z),r.worstRating=Q(n,j),t.aggregateRating=r}}function ae(e,t){t.id=Q(e,v),t.sku=Q(e,D),t.productId=Q(e,x),t.gtin=Q(e,$),t.gtin8=Q(e,P),t.gtin12=Q(e,N),t.gtin13=Q(e,M),t.gtin14=Q(e,w),t.isbn=Q(e,A),t.mpn=Q(e,g),t.url=Q(e,L)}function ie(e,t){t.priceCurrency=Q(e,b),t.lowPrice=Q(e,C),t.price=Q(e,y),t.minPrice=Q(e,F),t.maxPrice=Q(e,O)}o.exports={buildMicrodataFromJsonLd:Z}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsExtractMicrodataFromOpenGraphV2",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsMicrodata"),n=e.Product,r=e.Offer,i=e.PriceSpecification,l=e.Microdata,s=e.AggregateRating,u=a.getFbeventsModules("SignalsFBEventsUtils"),c=u.FBSet,d=a.getFbeventsModules("SignalsFBEventsShared"),m=d.unicodeSafeTruncate,p=500,_=["gtin","gtin8","gtin12","gtin13","gtin14","isbn"];function f(){for(var e=new l,o=new n,a=new r,i=new c(["og","product","music","video","article","book","profile","website","twitter"]),s=!1,u=t.querySelectorAll("meta[property]"),d=0;d<u.length;d++){var _=u[d],f=_.getAttribute("property"),y=_.getAttribute("content");if(!(f==null||y==null)&&!(f.indexOf(":")===-1||!i.has(f.split(":")[0]))){var C=m(y,p);(f==="product:retailer_item_id"||f==="product:sku"||f==="og:type"&&C.toLowerCase().includes("product"))&&(s=!0),C!==""&&(h(a,f,C),g(o,f,C))}}return s||(o.name=null,o.description=null),o.addOffer(a),e.addProduct(o),e}function g(e,t,n){e.name==null&&(t==="product:name"||t==="og:title")&&(e.name=n),e.description==null&&(t==="product:description"||t==="og:description")&&(e.description=n),(t==="product:retailer_item_id"||t==="product:sku")&&e.addId(n)}function h(e,t,n){e.priceCurrency==null&&(t==="product:price:currency"||t==="og:price:currency")&&(e.priceCurrency=n),e.id==null&&(t==="product:retailer_item_id"||t==="product:sku")&&(e.id=n),e.mpn==null&&t==="product:mfr_part_no"&&(e.mpn=n),e.gtin==null&&_.map(function(e){return"product:".concat(e)}).includes(t)&&(e.gtin=n),e.price==null&&(t==="product:price:amount"||t==="og:price:amount")&&(e.price=n),e.availability==null&&(t==="product:availability"||t==="og:availability")&&(e.availability=n)}o.exports={buildMicrodataFromOpenGraph:f}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsExtractMicrodataFromSchemaOrgV2",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsMicrodata"),n=e.Product,r=e.Offer,i=e.PriceSpecification,l=e.Microdata,s=e.AggregateRating,u=a.getFbeventsModules("SignalsFBEventsUtils"),c=u.FBSet,d=u.filter,m=a.getFbeventsModules("SignalsFBEventsShared"),p=m.signalsGetValueFromHTMLElement,_=a.getFbeventsModules("SignalsFBEventsExtractMicrodataUtils"),f=_.SCHEMA_ORG_PRODUCT_TYPES,g=_.SCHEMA_ORG_OFFER_TYPES,h=_.MPN_KEYS,C=_.AVAILABILITY_KEYS,b=_.PRICE_KEYS,v=_.CURRENCY_KEYS,R=_.ID_KEYS,L=_.OFFER_KEYS,E=_.SKU_KEYS,k=_.PRODUCT_ID_KEYS,I=_.GTIN_KEYS,T=_.GTIN8_KEYS,D=_.GTIN12_KEYS,x=_.GTIN13_KEYS,$=_.GTIN14_KEYS,P=_.ISBN_KEYS,N=_.SCHEMA_ORG_AGGREGATE_RATING_TYPES;function M(){var e=new l,t=A(),n=w();return e.merge(n),e.merge(t),e}function w(){for(var e=new l,n=t.querySelectorAll("[itemscope]"),r=0;r<n.length;r++){var o=n[r],a=q(o,"itemtype");f.includes(a.toLowerCase())&&e.addProduct(B(o))}return e}function A(){for(var e=new l,o=new n,a=new r,i=new s,u=t.querySelectorAll("[itemscope]"),c=U(u),d=u.length-1;d>=0;d--){var m=u[d],_=q(m,"itemtype");if(!(typeof _!="string"||_===""))for(var f=m.querySelectorAll("[itemprop]"),g=0;g<f.length;g++){var h=f[g];if(!c.has(h)){c.add(h);var y=h.getAttribute("itemprop");if(!(typeof y!="string"||y==="")){var C=p(h);C==null||C===""||(F(a,y,C),O(o,i,y,C,_))}}}}return o.addOffer(a),o.aggregateRating=i,e.addProduct(o),e}function F(e,t,n){e.priceCurrency==null&&t==="priceCurrency"&&(e.priceCurrency=n),e.id==null&&(t==="productID"||t==="sku")&&(e.id=n),e.mpn==null&&t==="mpn"&&(e.mpn=n);var r=[].concat(S(I),S(T),S(D),S(x),S($),S(P));e.gtin==null&&r.includes(t.toLowerCase())&&(e.gtin=n),e.price==null&&t==="price"&&(e.price=n),e.availability==null&&t==="availability"&&(e.availability=n)}function O(e,t,n,r,o){(n==="productID"||n==="sku")&&e.addId(r),f.includes(o.toLowerCase())&&(n==="name"&&(e.name=r),n==="description"&&(e.description=r)),N.includes(o.toLowerCase())&&(n==="ratingValue"?t.ratingValue=r:n==="ratingCount"?t.ratingCount=r:n==="reviewCount"?t.reviewCount=r:n==="bestRating"?t.bestRating=r:n==="worstRating"&&(t.worstRating=r))}function B(e){for(var t=V(e),n=y(t,2),r=n[0],o=n[1],a=e.querySelectorAll("[itemscope]"),i=0;i<a.length;i++){var l=a[i],s=q(l,"itemtype");if(g.includes(s.toLowerCase())){var u=W(l);u.priceCurrency=o,r.addOffer(u)}}return r}function W(e){for(var t=new r,n=e.querySelectorAll("[itemprop]"),o=[{itempropsLowerCase:b,get:function(){return t.price},set:function(n){t.price=n}},{itempropsLowerCase:C,get:function(){return t.availability},set:function(n){t.availability=n}},{itempropsLowerCase:h,get:function(){return t.mpn},set:function(n){t.mpn=n}},{itempropsLowerCase:[].concat(S(I),S(T),S(D),S(x),S($),S(P)),get:function(){return t.gtin},set:function(n){t.gtin=n}},{itempropsLowerCase:[].concat(S(k),S(E),S(R)),get:function(){return t.id},set:function(n){t.id=n}}],a=0;a<n.length;a++){var i=n[a],l=q(i,"itemprop"),s=p(i);if(!(l===""||s==null||s===""))for(var u=0;u<o.length;u++){var c=o[u],d=c.set,m=c.itempropsLowerCase,_=c.get;_()==null&&m.includes(l.toLowerCase())&&d(s)}}return t}function q(e,t){var n=e.getAttribute(t);return n==null||typeof n!="string"?"":n}function U(e){for(var t=new c,n=0;n<e.length;n++)t.add(e[n]);return t}function V(e){for(var t=new n,r=null,o=[{itempropsLowerCase:h,get:function(){return t.mpn},set:function(n){t.mpn=n}},{itempropsLowerCase:[].concat(S(I),S(T),S(D),S(x),S($),S(P)),get:function(){return t.gtin},set:function(n){t.gtin=n}},{itempropsLowerCase:[].concat(S(k),S(E),S(R)),get:function(){return t.id},set:function(n){t.id=n}},{itempropsLowerCase:v,get:function(){return r},set:function(t){r=t}}],a=e.querySelectorAll("[itemprop]"),i=0;i<a.length;i++){var l=a[i],s=q(l,"itemprop"),u=p(l);if(!(s===""||u==null||u===""))for(var c=0;c<o.length;c++){var d=o[c],m=d.set,_=d.itempropsLowerCase,f=d.get;f()==null&&_.includes(s.toLowerCase())&&m(u)}}return[t,r]}o.exports={buildMicrodataFromSchemaOrg:M,buildMicrodataFromSchemaOrgOld:A}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("signalsFBEventsExtractMicrodataSchemas",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var t=a.getFbeventsModules("SignalsFBEventsExtractMicrodataFromJsonLdV2"),n=t.buildMicrodataFromJsonLd,r=a.getFbeventsModules("SignalsFBEventsGuardrail"),i=a.getFbeventsModules("SignalsFBEventsShared"),l=i.MicrodataExtractionMethods,s=l.extractJsonLd,u=l.extractMetaTagData,c=l.extractOpenGraph,d=l.extractSchemaOrg,m=l.mergeProductMetadata,p=a.getFbeventsModules("SignalsFBEventsQE"),f=a.getFbeventsModules("SignalsFBEventsUtils"),g=f.keys,h=a.getFbeventsModules("SignalsFBEventsLogging"),y=h.logError,C=h.logUserError,b=h.logInfoString,v=a.getFbeventsModules("sha256_with_dependencies_new"),S="pixel",R="extractMicrodataSchemas",L=a.getFbeventsModules("SignalsFBEventsQE"),E=a.getFbeventsModules("SignalsFBEventsQEV2"),k=a.getFbeventsModules("SignalsFBEventsExperimentNames"),I=k.AUTOMATIC_PARAMETERS_JSON_AUTO_FIX;function T(e,t){!r.eval("enable_automatic_parameter_logging")||Math.random()>.02||b(e,"automatic_parameters",t)}function D(e){var t="product_url_presend_but_no_content_id_sizing";T("total",t);var n=e.productUrl!=null&&e.productUrl!="";n&&T("with_product_url",t);var r=e.automaticParameters;if(r!=null){T("with_automatic_parameters",t),n&&T("with_product_url_and_automatic_parameters",t);var o=r.contents;if(!(o==null||!Array.isArray(o))){n&&T("with_product_url_and_contents",t);var a=o.map(function(e){return e.id});a=a.filter(function(e){return e!=null&&e!=""}),a.length!==0&&(n&&T("with_product_url_and_contentid",t),T("with_valid_contentid",t))}}}function x(e,t){return n().getProductUrls()}function $(t){for(var n=t.id,r=t.includeJsonLd,o=r===void 0?!1:r,a=t.instance,i=t.onlyHash,l=i===void 0?!1:i,s=t.includeAutomaticParameters,u=s===void 0?!1:s,c=t.includeProductContent,d=c===void 0?!1:c,f=t.includeProductUrls,g=f===void 0?!1:f,h=E.isInTestPageLoadLevelExperiment(I),y={automaticParameters:{},productID:null,productUrl:null,productContents:[],productUrls:[]},b=P(u,!1,y,d),v=b.extractedProperties,S=N(o,u,h,y,d),R=S.extractedProperties,L=0;L<S.invalidInnerTexts.length;L++)C({jsonLd:S.invalidInnerTexts[L],type:"INVALID_JSON_LD"});var k=F(),T=M(u,!1,y,d),x=T.extractedProperties;y=m([b.productMetadata,S.productMetadata,T.productMetadata]),D(y);var $=p.get("logDataLayer"),O=$&&$.isInExperimentGroup,B=O===!0?e.dataLayer||[]:[];if(A(x,R,v,k,B)){var W={DataLayer:B,MetaTag:k,OpenGraph:v,"Schema.org":x};return o&&(W=_(_({},W),{},{"JSON-LD":R})),w(W,y,l,u,d,g)}}function P(e,t,n,r){var o={extractedProperties:{},productMetadata:n};try{o=c(e,t,r)}catch(e){var a="[Microdata OpenGraph]";e!=null&&e.message!=null&&(a+=": ".concat(e.message)),y(new Error(a),S,R)}return o}function N(e,t,n,r,o){var a={extractedProperties:[],invalidInnerTexts:[],productMetadata:r};try{a=e?s(t,n,T,o):{extractedProperties:[],invalidInnerTexts:[],productMetadata:r}}catch(e){var i="[Microdata JSON LD]";e!=null&&e.message!=null&&(i+=": ".concat(e.message)),y(new Error(i),S,R)}return a}function M(e,t,n,r){var o={extractedProperties:[],productMetadata:n};try{o=d(e,t,r)}catch(e){var a="[Microdata Schema]";e!=null&&e.message!=null&&(a+=": ".concat(e.message)),y(new Error(a),S,R)}return o}function w(e,t,n,r,o,a){var i=v(JSON.stringify(e));return i!=null&&(i=i.substring(0,24)),n?{hmd:i,pid:t.productID,pl:t.productUrl}:o?t.productContents.length===0?null:{contents:t.productContents}:r?{ap:t.automaticParameters}:a?{productUrls:t.productUrls}:e}function A(e,t,n,r,o){return e.length>0||t.length>0||g(n).length>0||g(r).length>1||r.title!==""||o.length&&o.length>0}function F(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t={title:""};try{t=u(e)}catch(e){var n="[Microdata Metadata]";e!=null&&e.message!=null&&(n+=": ".concat(e.message)),y(new Error(n),S,R)}return t}o.exports={extractAllSchemas:$,extractMetaTagDataWithErrorLogging:F,extractProductURLs:x}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsExtractMicrodataUtils",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsUtils"),t=e.each,n=a.getFbeventsModules("SignalsFBEventsShared"),r=n.MicrodataExtractionMethods,i=r.jsonRepair,l=12e4,s=["product","https://schema.org/product","http://schema.org/product"],u=["offer","https://schema.org/offer","http://schema.org/offer"],c=["aggregateoffer","https://schema.org/aggregateoffer","http://schema.org/aggregateoffer"],d=["aggregaterating","https://schema.org/aggregaterating","http://schema.org/aggregaterating"],m=["aggregaterating"],p=["offers","offer"],_=["pricespecification"],f=["mainentity"],g=["@graph"],h=["hasvariant"],y=["@id"],C=["sku"],b=["productid","product_id"],v=["gtin"],S=["gtin8"],R=["gtin12"],L=["gtin13"],E=["gtin14"],k=["isbn"],I=["mpn"],D=["url"],x=["availability"],$=["pricecurrency"],P=["lowprice"],N=["price"],M=["minprice"],w=["maxprice"],A=["name"],F=["description"],O=["ratingvalue"],B=["ratingcount"],W=["reviewcount"],q=["bestrating"],U=["worstrating"];function V(e,n){if(e==null||T(e)!=="object")return null;var r=Object.keys(e),o={};t(r,function(t){n.includes(t.toLowerCase())&&(o[t.toLowerCase()]=e[t])});var a=n.find(function(e){return o[e]});return a!=null?o[a]:null}function H(e,t){var n=V(e,t);return n==null?null:typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):null}function G(e,n){n!=null&&(Array.isArray(n)?t(n,function(t){t!=null&&T(t)==="object"&&e.push(t)}):T(n)==="object"&&e.push(n))}function z(e,t){var n=K(e);if(n==null)return[];try{n=JSON.parse(n.replace(/[\n\r\t]+/g," "))}catch(e){if(t){if(n=i(n),n==null)return[];n=JSON.parse(n.replace(/[\n\r\t]+/g," "))}else throw e}return Array.isArray(n)?n:[n]}function j(e){return e==null||T(e)!=="object"?"":typeof e["@type"]=="string"&&e["@type"]!=null?e["@type"].toLowerCase():""}function K(e){return e==null?null:e.replace(/\\"|\"(?:\\"|[^\"])*\"|(\/\/.*|\/\*[\s\S]*?\*\/)/g,function(e,t){return t?"":e})}function Q(e){if(e==null)return null;try{return i(e)}catch(t){return e}}o.exports={JSON_LD_TOTAL_LENGTH_LIMIT:l,SCHEMA_ORG_PRODUCT_TYPES:s,SCHEMA_ORG_OFFER_TYPES:u,SCHEMA_ORG_AGGREGATE_OFFER_TYPES:c,MPN_KEYS:I,AVAILABILITY_KEYS:x,PRICE_KEYS:N,LOW_PRICE_KEYS:P,CURRENCY_KEYS:$,ID_KEYS:y,OFFER_KEYS:p,PRICE_SPECIFICATION_KEYS:_,URL_KEYS:D,MAIN_ENTITY_KEYS:f,GRAPH_KEYS:g,HAS_VARIANT_KEYS:h,SKU_KEYS:C,PRODUCT_ID_KEYS:b,GTIN_KEYS:v,GTIN8_KEYS:S,GTIN12_KEYS:R,GTIN13_KEYS:L,GTIN14_KEYS:E,ISBN_KEYS:k,MIN_PRICE_KEYS:M,MAX_PRICE_KEYS:w,NAME_KEYS:A,DESCRIPTION_KEYS:F,SCHEMA_ORG_AGGREGATE_RATING_TYPES:d,AGGREGATE_RATING_KEYS:m,RATING_VALUE_KEYS:O,RATING_COUNT_KEYS:B,REVIEW_COUNT_KEYS:W,BEST_RATING_KEYS:q,WORST_RATING_KEYS:U,getFieldFromJsonRaw:V,getFieldFromJsonAsString:H,addToList:G,parseJsonLdText:z,getJsonLdType:j}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsMicrodata",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},a=o.exports;return(function(){"use strict";var e=new WeakSet,t=(function(){function t(){l(this,t),c(this,e),this.products=[],this.errors=[]}return u(t,[{key:"addError",value:function(t){this.errors.push(t)}},{key:"addProduct",value:function(t){this.products.push(t)}},{key:"merge",value:function(t){var e=i(t.products),n;try{for(e.s();!(n=e.n()).done;){var r=n.value;this.addProduct(r)}}catch(t){e.e(t)}finally{e.f()}var o=i(t.errors),a;try{for(o.s();!(a=o.n()).done;){var l=a.value;this.addError(l)}}catch(e){o.e(e)}finally{o.f()}}},{key:"getProductUrls",value:function(){var e=[],t=i(this.products),n;try{for(t.s();!(n=t.n()).done;){var r=n.value;if(r.url!=null&&e.push(r.url),r.offers!=null){var o=i(r.offers),a;try{for(o.s();!(a=o.n()).done;){var l=a.value;l.url!=null&&e.push(l.url)}}catch(e){o.e(e)}finally{o.f()}}}}catch(e){t.e(e)}finally{t.f()}return e}},{key:"getAutomaticParameters",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{includeAllContentIds:!0},o=m(e,this,n).call(this),a=[],l=i(this.products),s;try{for(l.s();!(s=l.n()).done;){var u=s.value,c=m(e,this,r).call(this,u,t);if(c!=null){var d=i(c),p;try{for(d.s();!(p=d.n()).done;){var _=p.value;_!=null&&a.push(_)}}catch(e){d.e(e)}finally{d.f()}}}}catch(e){l.e(e)}finally{l.f()}var f={};return a.length>0&&(f.contents=a),o!=null&&(f.currency=o),Object.keys(f).length===0?null:f}},{key:"getProductContents",value:function(){var e=[],t=i(this.products),n;try{for(t.s();!(n=t.n()).done;){var r=n.value,o={},a=r.name,l=r.description,s=r.getAggregateRating(),u=r.getAllProductIds();b(o,"name",a),b(o,"description",l),b(o,"aggregate_rating",s),b(o,"ids",u),S(o)||e.push(o)}}catch(e){t.e(e)}finally{t.f()}return e.length>0?e:null}}])})();function n(){var e=i(this.products),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;if(n.offers!=null){var r=i(n.offers),o;try{for(r.s();!(o=r.n()).done;){var a=o.value;if(a.priceCurrency!=null)return a.priceCurrency;if(a.priceSpecification!=null){var l=i(a.priceSpecification),s;try{for(l.s();!(s=l.n()).done;){var u=s.value;if(u.priceCurrency!=null)return u.priceCurrency}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){r.e(e)}finally{r.f()}}}}catch(t){e.e(t)}finally{e.f()}return null}function r(e,t){var n=e.offers;if(n==null)return null;var r=h(e),o=g(e),a=e.getMPN(),l=[],s=i(n),u;try{for(s.s();!(u=s.n()).done;){var c=u.value,d={},m=g(c),p=c.getMPN(),_=c.getAvailability(),f=c.getPrice(),C=h(c),R=m!=null?m:o,L=p!=null?p:a,E=C!=null?C:r;if(b(d,"gtin",R),b(d,"mpn",L),b(d,"availability",_),b(d,"item_price",f),t.includeAllContentIds){var k=y(c);k.length===0&&r!=null&&(k=[r]),v(d,k).forEach(function(e){S(e)||l.push(e)})}else b(d,"id",E),S(d)||l.push(d)}}catch(e){s.e(e)}finally{s.f()}return l.length>0?l:null}var a=(function(){function e(){l(this,e)}return u(e,[{key:"addId",value:function(t){this.ids==null&&(this.ids=[]),this.ids.push(t)}},{key:"addOffer",value:function(t){this.offers==null&&(this.offers=[]),this.offers.push(t)}},{key:"getMPN",value:function(){return this.mpn}},{key:"getAggregateRating",value:function(){var e=this.aggregateRating;if(e==null)return null;var t={};return b(t,"ratingValue",e.ratingValue),b(t,"ratingCount",e.ratingCount),b(t,"reviewCount",e.reviewCount),b(t,"bestRating",e.bestRating),b(t,"worstRating",e.worstRating),S(t)?null:t}},{key:"getAllProductIds",value:function(){var e=this.ids==null?[]:this.ids,t=h(this);if(t!=null&&e.push(t),this.offers==null)return e;var n=i(this.offers),r;try{for(n.s();!(r=n.n()).done;){var o=r.value,a=h(o);a!=null&&e.push(a)}}catch(e){n.e(e)}finally{n.f()}var l=[],s=i(e),u;try{for(s.s();!(u=s.n()).done;){var c=u.value;l.includes(c)||l.push(c)}}catch(e){s.e(e)}finally{s.f()}return l.length>0?l:null}}])})(),s=u(function e(){l(this,e)}),d=new WeakSet,p=(function(){function e(){l(this,e),c(this,d)}return u(e,[{key:"getMPN",value:function(){return this.mpn}},{key:"getAvailability",value:function(){return C(this.availability)}},{key:"getPrice",value:function(){var e=R(this.price);return e!=null||(e=R(this.lowPrice),e!=null)?e:m(d,this,f).call(this)}}])})();function f(){if(this.priceSpecification==null)return null;var e=null,t=i(this.priceSpecification),n;try{for(t.s();!(n=t.n()).done;){var r=n.value;e=L(e,R(r.price)),e=L(e,R(r.lowPrice)),e=L(e,R(r.maxPrice)),e=L(e,R(r.minPrice))}}catch(e){t.e(e)}finally{t.f()}return e}function g(e){return e.gtin!=null?e.gtin:e.gtin8!=null?e.gtin8:e.gtin12!=null?e.gtin12:e.gtin13!=null?e.gtin13:e.gtin14!=null?e.gtin14:e.isbn!=null?e.isbn:null}function h(e){return e.sku!=null?e.sku:e.productId!=null?e.productId:e.id!=null?e.id:null}function y(e){if(e==null)return[];var t=[];return e.id!=null&&t.push(e.id),e.sku!=null&&t.push(e.sku),e.productId!=null&&t.push(e.productId),t}function C(e){if(e==null||typeof e!="string"&&!(e instanceof String))return null;var t=e.split("/");return t.length>0?t[t.length-1]:""}function b(e,t,n){n!=null&&(e[t]=n)}function v(e,t){var n=[];return t.forEach(function(t){if(t!Line truncated
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.automaticparameters",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsPlugin"),t=a.getFbeventsModules("SignalsFBEventsEvents"),n=t.getAutomaticParameters,r=a.getFbeventsModules("SignalsFBEventsUtils"),i=r.some,l=a.getFbeventsModules("signalsFBEventsExtractMicrodataSchemas"),s=l.extractAllSchemas,u=a.getFbeventsModules("SignalsFBEventsUtils"),c=u.FBSet,d=a.getFbeventsModules("SignalsFBEventsQE"),m=a.getFbeventsModules("SignalsFBEventsQEV2"),p=a.getFbeventsModules("SignalsFBEventsExperimentNames"),_=p.PROCESS_AUTOMATIC_PARAMETERS,f=p.AUTOMATIC_PARAMETERS_JSON_AUTO_FIX,g=p.MICRODATA_REFACTOR_MIGRATION,h=a.getFbeventsModules("SignalsFBEventsExtractMicrodataFromJsonLdV2"),y=h.buildMicrodataFromJsonLd,C=a.getFbeventsModules("SignalsFBEventsExtractMicrodataFromOpenGraphV2"),b=C.buildMicrodataFromOpenGraph,v=a.getFbeventsModules("SignalsFBEventsExtractMicrodataFromSchemaOrgV2"),S=v.buildMicrodataFromSchemaOrg,R=a.getFbeventsModules("SignalsFBEventsMicrodata"),L=R.Microdata;o.exports=new e(function(e,t){n.listen(function(e,n){if(!I(e,n,t))return{};var r=m.isInTestPageLoadLevelExperiment(g);if(r){var o=E();return o!=null?o:{}}var a=s({id:e,includeJsonLd:!0,instance:t,onlyHash:!1,includeAutomaticParameters:!0});return a!=null?a:{}})});function E(){var e=k().getAutomaticParameters();return e==null?null:{ap:e}}function k(){var e=new L,t=m.isInTestPageLoadLevelExperiment(f);return e.merge(b()),e.merge(y({handleInvalidJson:t})),e.merge(S()),e}function I(e,t,n){return d.isInTest(_),n.disableAutoConfig?!1:i(n.getOptedInPixels("AutomaticParameters"),function(t){return t.id===e})}})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.automaticparameters"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.automaticparameters",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.automaticparameters",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},i(e)}function l(e,t){var n=typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(t){l=!0,a=t},f:function(){try{i||n.return==null||n.return()}finally{if(l)throw a}}}}function s(e,t){if(e){if(typeof e=="string")return u(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g(r.key),r)}}function _(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=h(e,"string");return i(t)=="symbol"?t:t+""}function h(e,t){if(i(e)!="object"||!e)return e;var n=e[typeof Symbol=="function"?Symbol.toPrimitive:"@@toPrimitive"];if(n!==void 0){var r=n.call(e,t||"default");if(i(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsBlockFlags",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},a=o.exports;return(function(){"use strict";function e(e){var t={};return e.forEach(function(e){t[e]=1}),{bfs:t}}o.exports={createBlockFlags:e}})(),o.exports})(e,t,n,r)})
|
||||
,a.ensureModuleRegistered("SignalsFBEventsBotDetectionEngine",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsUtils"),t=e.stringStartsWith,n=a.getFbeventsModules("SignalsFBEventsGuardrail"),r=a.getFbeventsModules("SignalsFBEventsLogging"),i=r.logWarning,s=Object.freeze({NOT_SPIDER_AND_NOT_BOT:0,SPIDER_OR_BOT:1,NOT_SPIDER_OR_BOT_EXCEPTION:2,SPIDER_OR_BOT_WHITELIST_FAILED:3}),u=Object.freeze({EXPERIMENT:"Experiment",STABLE:"Stable"}),c=Object.freeze({STARTS_WITH:"StartsWith",CONTAINS:"Contains"}),p=Object.freeze({BROAD_BLOCK:"BroadBlock",NARROW_ALLOW:"NarrowAllow"}),g=(function(){function e(){m(this,e),f(this,"_isInitialized",!1),f(this,"_rulesData",null),f(this,"_spiderPatterns",[]),f(this,"_browserPatterns",[]),f(this,"_userAgentCache",new Map),f(this,"_cacheMaxSize",1e3),this._initializeEngine()}return _(e,[{key:"_initializeEngine",value:function(){this._isInitialized=!0}},{key:"loadRulesFromConfig",value:function(t){try{if(this._rulesData=t,!t.spider_bot_rules||!t.browser_patterns){i("Invalid server rules format, missing required fields");return}this._spiderPatterns=this._parseRuleString(t.spider_bot_rules),this._browserPatterns=this._parseRuleString(t.browser_patterns)}catch(e){i("Failed to load rules from config:",e),this._rulesData=null,this._spiderPatterns=[],this._browserPatterns=[]}}},{key:"_parseRuleString",value:function(t){return!t||t.trim()===""?[]:t.split("\n").filter(function(e){return e.length>1}).map(function(e){var t=e.charAt(0),n=e.substring(1).split("~");return{pattern:n[0].toLowerCase(),startOfString:t==="1",exceptions:n.slice(1).map(function(e){return e.toLowerCase()})}})}},{key:"_isMetabot",value:function(t,n){if(n===s.SPIDER_OR_BOT_WHITELIST_FAILED){var e="facebookexternalhit";return t.toLowerCase().includes(e)}return!1}},{key:"detectBot",value:function(t){if(!this._isInitialized)return this._createErrorResult("Engine not initialized",t);var e=this._getCacheKey(t);if(this._userAgentCache.has(e)){var n=this._userAgentCache.get(e);if(n)return d(d({},n),{},{cached:!0})}try{var r=this._performBotDetection(t);return this._cacheResult(e,r),r}catch(e){return i("Error during bot detection:",e),this._createErrorResult(e.message,t)}}},{key:"shouldBlockUserAgent",value:function(t){var e=this.detectBot(t);return e.ruleType===s.SPIDER_OR_BOT||e.ruleType===s.SPIDER_OR_BOT_WHITELIST_FAILED&&e.isMetabot===!0}},{key:"_checkMobileAppBypass",value:function(t){for(var e=t.toLowerCase(),n=["fban/","fbav/","fbandroidsdk","fbiossdk","fbandroidsdk.","fbiossdk.","fb-zerobalance","fb_iab","fbios","fbandroid"],r=0,o=n;r<o.length;r++){var a=o[r];if(e.includes(a))return!0}var i=["mobile","iphone","android","blackberry","windows phone"],s=e.includes("facebook")||e.includes("fb");if(s){var u=l(i),c;try{for(u.s();!(c=u.n()).done;){var d=c.value;if(e.includes(d))return!0}}catch(e){u.e(e)}finally{u.f()}}return!1}},{key:"_performBotDetection",value:function(r){var e=r.toLowerCase(),o=this._checkMobileAppBypass(r),a=o||this._checkBrowserPatterns(e);if(!a){var i=this._isMetabot(r,s.SPIDER_OR_BOT_WHITELIST_FAILED);return{isBot:!0,ruleType:s.SPIDER_OR_BOT_WHITELIST_FAILED,isMetabot:i}}var u=this._checkSpiderPatterns(e),c=n.eval("use_string_prefix_match_from_util");if(u.matched&&u.exceptions&&u.exceptions.length>0){var d=l(u.exceptions),m;try{for(d.s();!(m=d.n()).done;){var p=m.value,_=c?t(e,p):e.startsWith(p),f=u.startOfString?_:e.includes(p);if(f)return{isBot:!1,ruleType:s.NOT_SPIDER_OR_BOT_EXCEPTION}}}catch(e){d.e(e)}finally{d.f()}}return u.matched?{isBot:!0,ruleType:s.SPIDER_OR_BOT}:{isBot:!1,ruleType:s.NOT_SPIDER_AND_NOT_BOT}}},{key:"_checkBrowserPatterns",value:function(r){if(this._browserPatterns.length===0)return!0;var e=n.eval("use_string_prefix_match_from_util"),o=l(this._browserPatterns),a;try{for(o.s();!(a=o.n()).done;){var i=a.value,s=e?t(r,i.pattern):r.startsWith(i.pattern),u=i.startOfString?s:r.includes(i.pattern);if(u)return!0}}catch(e){o.e(e)}finally{o.f()}return!1}},{key:"_checkSpiderPatterns",value:function(r){var e=n.eval("use_string_prefix_match_from_util"),o=l(this._spiderPatterns),a;try{for(o.s();!(a=o.n()).done;){var i=a.value,s=e?t(r,i.pattern):r.startsWith(i.pattern),u=i.startOfString?s:r.includes(i.pattern);if(u)return{matched:!0,pattern:i.pattern,exceptions:i.exceptions||[],startOfString:i.startOfString}}}catch(e){o.e(e)}finally{o.f()}return{matched:!1}}},{key:"_getCacheKey",value:function(t){return t.length>100?t.substring(0,100)+"_"+t.length:t}},{key:"_cacheResult",value:function(t,n){if(this._userAgentCache.size>=this._cacheMaxSize){var e=this._userAgentCache.keys().next().value;e&&this._userAgentCache.delete(e)}this._userAgentCache.set(t,n)}},{key:"_createErrorResult",value:function(t,n){return{isBot:!1,ruleType:"ERROR"}}},{key:"getStatus",value:function(){return{initialized:this._isInitialized,rules_loaded:this._rulesData!=null,cache_size:this._userAgentCache.size,cache_max_size:this._cacheMaxSize,spider_patterns_count:this._spiderPatterns.length,browser_patterns_count:tLine truncated
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.botblocking",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsConfigStore"),t=a.getFbeventsModules("SignalsFBEventsBlockFlags"),n=t.createBlockFlags,r=a.getFbeventsModules("SignalsFBEventsBotDetectionEngine"),i=a.getFbeventsModules("SignalsFBEventsGuardrail"),l={NOT_SPIDER_AND_NOT_BOT:0,SPIDER_OR_BOT:1,NOT_SPIDER_OR_BOT_EXCEPTION:2,SPIDER_OR_BOT_WHITELIST_FAILED:3},s="pixel",u="botblocking",c=a.getFbeventsModules("SignalsFBEventsLogging"),d=c.logWarning,m=c.logInfoString,p=a.getFbeventsModules("SignalsFBEventsEvents"),_=p.configLoaded,f=p.getCustomParameters,g=a.getFbeventsModules("SignalsFBEventsSendEventEvent"),h=a.getFbeventsModules("SignalsFBEventsTyped"),y=h.coerce,C=h.Typed,b=a.getFbeventsModules("SignalsFBEventsPlugin");o.exports=new b(function(t,o){var a=null,l=!1,c=null;_.listen(function(t){if(t!=null){var n=o.optIns.isOptedIn(t,"BotBlocking");if(n){var i=o.getPixel(t);if(i!=null&&(c=e.get(t,"botblocking"),c!=null))try{if(a=new r,c.rules){a.loadRulesFromConfig(c.rules),m("Bot detection rules loaded from server config - pixel_id: ".concat(t));var p=navigator.userAgent||"";l=a.shouldBlockUserAgent(p)}}catch(e){d(new Error("[BotBlocking] Failed to initialize bot blocking plugin - pixel_id: ".concat(t,", error: ").concat(e.message)),s,u)}}}}),f.listen(function(e,t,r){var i=o.optIns.isOptedIn(e.id,"BotBlocking");if(!i)return{};if(c==null)return{};if(!a)return{};try{return l?n(["b"]):{}}catch(n){return d(new Error("[BotBlocking] Error during bot blocking in getCustomParameters - pixel_id: ".concat(e.id,", event_name: ").concat(t,", error: ").concat(n.message)),s,u),{}}}),g.listen(function(e){var t=e.id;if(t==null)return!1;var n=y(t,C.fbid());if(n==null)return!1;var r=o.optIns.isOptedIn(n,"BotBlocking");if(!r)return!1;var c=o.getPixel(n);if(c==null||!a)return!1;var p=i.eval("bot_blocking_client_side_block_enabled",n);if(!p)return!1;try{return l?(m("[Meta pixel] Bot traffic detected and blocked - pixel_id: ".concat(n)),!0):!1}catch(e){return d(new Error("[BotBlocking] Error during bot blocking in SendEventEvent - pixel_id: ".concat(n,", error: ").concat(e.message)),s,u),!1}})})})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.botblocking"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.botblocking",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.botblocking",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;if(a.execStart=e.performance&&e.performance.now&&e.performance.now(),!(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})())return;function i(e,t){var n=typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=L(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(t){l=!0,a=t},f:function(){try{i||n.return==null||n.return()}finally{if(l)throw a}}}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g(r.key),r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){d(e,t),t.add(e)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=h(e,"string");return T(t)=="symbol"?t:t+""}function h(e,t){if(T(e)!="object"||!e)return e;var n=e[typeof Symbol=="function"?Symbol.toPrimitive:"@@toPrimitive"];if(n!==void 0){var r=n.call(e,t||"default");if(T(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function y(e,t){return v(e)||b(e,t)||L(e,t)||C()}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||e["@@iterator"];if(n!=null){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function v(e){if(Array.isArray(e))return e}function S(e){return k(e)||E(e)||L(e)||R()}function R(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(e,t){if(e){if(typeof e=="string")return I(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}function E(e){if(typeof Symbol!="undefined"&&e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]!=null||e["@@iterator"]!=null)return Array.from(e)}function k(e){if(Array.isArray(e))return I(e)}function I(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e){"@babel/helpers - typeof";return T=typeof Symbol=="function"&&typeof(typeof Symbol=="function"?Symbol.iterator:"@@iterator")=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==(typeof Symbol=="function"?Symbol.prototype:"@@prototype")?"symbol":typeof e},T(e)}a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.pagemetadata",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var e=a.getFbeventsModules("SignalsFBEventsPlugin"),t=a.getFbeventsModules("SignalsFBEventsUtils"),n=t.some,r=a.getFbeventsModules("SignalsFBEventsEvents"),i=r.getCustomParameters,l=a.getFbeventsModules("signalsFBEventsExtractMicrodataSchemas"),s=l.extractAllSchemas,u=l.extractMetaTagDataWithErrorLogging,c=a.getFbeventsModules("SignalsFBEventsQEV2"),d=a.getFbeventsModules("SignalsFBEventsExperimentNames"),m=d.AUTOMATIC_PARAMETERS_JSON_AUTO_FIX,p=d.MICRODATA_REFACTOR_MIGRATION,_=a.getFbeventsModules("SignalsFBEventsExtractMicrodataFromJsonLdV2"),f=_.buildMicrodataFromJsonLd,g=a.getFbeventsModules("SignalsFBEventsExtractMicrodataFromOpenGraphV2"),h=g.buildMicrodataFromOpenGraph,y=a.getFbeventsModules("SignalsFBEventsExtractMicrodataFromSchemaOrgV2"),C=y.buildMicrodataFromSchemaOrgOld,b=a.getFbeventsModules("SignalsFBEventsMicrodata"),v=b.Microdata;o.exports=new e(function(e,t){i.listen(function(e,r){if(t.disableAutoConfig)return{};var o=n(t.getOptedInPixels("PageMetadata"),function(t){return t.id===e.id});if(!o)return{};var a=u();r!=="PageView"&&a&&T(a)==="object"&&Object.prototype.hasOwnProperty.call(a,"title")&&delete a.title;var i=c.isInTestPageLoadLevelExperiment(p),l=null;if(i?l=S():l=s({id:e.id,includeJsonLd:!0,instance:t,onlyHash:!1,includeAutomaticParameters:!1,includeProductContent:!0}),l==null||l.contents==null)return{pmd:a};var d=l.contents;return a&&T(a)==="object"?(a.contents=d,{pmd:a}):{pmd:{contents:d}}})});function S(){var e=R().getProductContents();return e==null?null:{contents:e}}function R(){var e=new v,t=c.isInTestPageLoadLevelExperiment(m);return e.merge(h()),e.merge(f({handleInvalidJson:t})),e.merge(C()),e}})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.pagemetadata"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.pagemetadata",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.pagemetadata",function(){
|
||||
return o.exports})})()})(window,document,location,history);
|
||||
(function(e,t,n,r){var o={exports:{}},a=o.exports;(function(){var a=e.fbq;a.execStart=e.performance&&e.performance.now&&e.performance.now(),(function(){var t=e.postMessage||function(){};return a?!0:(t({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*"),"error"in console,!1)})()&&(a.__fbeventsModules||(a.__fbeventsModules={},a.__fbeventsResolvedModules={},a.getFbeventsModules=function(e){return a.__fbeventsResolvedModules[e]||(a.__fbeventsResolvedModules[e]=a.__fbeventsModules[e]()),a.__fbeventsResolvedModules[e]},a.fbIsModuleLoaded=function(e){return!!a.__fbeventsModules[e]},a.ensureModuleRegistered=function(e,t){a.fbIsModuleLoaded(e)||(a.__fbeventsModules[e]=t)})
|
||||
,a.ensureModuleRegistered("SignalsFBEvents.plugins.websiteperformance",function(){
|
||||
return(function(e,t,n,r){var o={exports:{}},i=o.exports;return(function(){"use strict";var t=a.getFbeventsModules("SignalsFBEventsEvents"),n=t.getCustomParameters,r=a.getFbeventsModules("SignalsFBEventsPlugin"),i=a.getFbeventsModules("SignalsFBEventsLogging"),l=i.logInfo,s=i.logError,u=a.getFbeventsModules("SignalsParamList"),c="pixel",d="WebsitePerformance";o.exports=new r(function(t,r){try{var o=function(){var t=typeof e.performance.getEntriesByType=="function"?e.performance.getEntriesByType("navigation")[0]:null;if(t==null)return null;var n=t.domContentLoadedEventEnd,r=t.startTime,o=n-r;return o>0?o:null},a=function(){if(e.performance==null||e.performance.timing==null)return null;var t=e.performance.timing,n=t.domContentLoadedEventEnd,r=t.navigationStart,o=n-r;return o>0?o:null},i=!1;(e.performance==null||typeof e.performance.getEntriesByType!="function")&&(l(new Error("Modern Performance not supported"),c,d),e.performance!=null&&e.performance.timing!=null&&(i=!0));var u=null;i?u=a():u=o(),n.listen(function(e,t,n){try{var l=r.optIns.isOptedIn(e.id,"WebsitePerformance");return l?(u==null&&(i?u=a():u=o()),u==null?{}:{plt:u}):{}}catch(e){return s(e,c,d),{}}})}catch(e){s(e,c,d);return}})})(),o.exports})(e,t,n,r)}),o.exports=a.getFbeventsModules("SignalsFBEvents.plugins.websiteperformance"),a.registerPlugin&&a.registerPlugin("fbevents.plugins.websiteperformance",o.exports)
|
||||
,a.ensureModuleRegistered("fbevents.plugins.websiteperformance",function(){
|
||||
return o.exports}))})()})(window,document,location,history);
|
||||
fbq.registerPlugin("1468546770034581", {__fbEventsPlugin: 1, plugin: function(fbq, instance, config) { config.set("1468546770034581", "inferredEvents", {"buttonSelector":null,"disableRestrictedData":false});
|
||||
fbq.loadPlugin("inferredevents");
|
||||
fbq.loadPlugin("identity");
|
||||
instance.optIn("1468546770034581", "InferredEvents", true);
|
||||
config.set("1468546770034581", "automaticMatching", {"selectedMatchKeys":["em","fn","ln","ph","ge","zp","ct","st","country","db","external_id"]});
|
||||
fbq.loadPlugin("inferredevents");
|
||||
fbq.loadPlugin("identity");
|
||||
instance.optIn("1468546770034581", "AutomaticMatching", true);
|
||||
fbq.loadPlugin("iwlbootstrapper");
|
||||
instance.optIn("1468546770034581", "IWLBootstrapper", true);
|
||||
config.set("1468546770034581", "cookie", {"fbcParamsConfig":{"params":[{"prefix":"","query":"fbclid","ebp_path":"clickID"},{"prefix":"aem","query":"brid","ebp_path":"aem"},{"prefix":"waaem","query":"waaem","ebp_path":""}]},"enableFbcParamSplitAll":false,"maxMultiFbcQueueSize":5,"enableFbcParamSplitSafariOnly":true});
|
||||
fbq.loadPlugin("cookie");
|
||||
instance.optIn("1468546770034581", "FirstPartyCookies", true);
|
||||
fbq.loadPlugin("inferredevents");
|
||||
instance.optIn("1468546770034581", "InferredEvents", true);
|
||||
fbq.loadPlugin("automaticmatchingforpartnerintegrations");
|
||||
instance.optIn("1468546770034581", "AutomaticMatchingForPartnerIntegrations", true);
|
||||
config.set(null, "batching", {"batchWaitTimeMs":10,"maxBatchSize":10});
|
||||
config.set(null, "microdata", {"waitTimeMs":500});
|
||||
config.set("1468546770034581", "prohibitedSources", {"prohibitedSources":[]});
|
||||
fbq.loadPlugin("prohibitedsources");
|
||||
instance.optIn("1468546770034581", "ProhibitedSources", true);
|
||||
config.set("1468546770034581", "unwantedData", {"blacklisted_keys":{"Purchase":{"cd":["token","id_transazione","id_ordine","holder_name","card_number"],"url":[]},"PageView":{"cd":["ttclid","c","token","PayerID","id_order","card_number"],"url":["changepassword"]},"CompleteRegistration":{"cd":["ttclid"],"url":[]}},"sensitive_keys":{}});
|
||||
fbq.loadPlugin("unwanteddata");
|
||||
instance.optIn("1468546770034581", "UnwantedData", true);
|
||||
config.set("1468546770034581", "IABPCMAEBridge", {"enableAutoEventId":true});
|
||||
fbq.loadPlugin("iabpcmaebridge");
|
||||
instance.optIn("1468546770034581", "IABPCMAEBridge", true);
|
||||
config.set("1468546770034581", "browserProperties", {"delayInMs":200,"enableEventSuppression":true,"enableBackupTimeout":true,"fbcParamsConfig":{"params":[{"prefix":"","query":"fbclid","ebp_path":"clickID"},{"prefix":"aem","query":"brid","ebp_path":"aem"},{"prefix":"waaem","query":"waaem","ebp_path":""}]},"enableFbcParamSplitIOS":false,"enableFbcParamSplitAndroid":false});
|
||||
fbq.loadPlugin("browserproperties");
|
||||
instance.optIn("1468546770034581", "BrowserProperties", true);
|
||||
config.set("1468546770034581", "eventValidation", {"unverifiedEventNames":[],"restrictedEventNames":[]});
|
||||
fbq.loadPlugin("eventvalidation");
|
||||
instance.optIn("1468546770034581", "EventValidation", true);
|
||||
config.set("1468546770034581", "clientHint", {"delayInMs":200,"disableBackupTimeout":false});
|
||||
fbq.loadPlugin("clienthint");
|
||||
instance.optIn("1468546770034581", "ClientHint", true);
|
||||
fbq.loadPlugin("lastexternalreferrer");
|
||||
instance.optIn("1468546770034581", "LastExternalReferrer", true);
|
||||
fbq.loadPlugin("cookiedeprecationlabel");
|
||||
instance.optIn("1468546770034581", "CookieDeprecationLabel", true);
|
||||
fbq.loadPlugin("unwantedparams");
|
||||
instance.optIn("1468546770034581", "UnwantedParams", true);
|
||||
fbq.loadPlugin("standardparamchecks");
|
||||
instance.optIn("1468546770034581", "StandardParamChecks", true);
|
||||
fbq.loadPlugin("topicsapi");
|
||||
instance.optIn("1468546770034581", "TopicsAPI", true);
|
||||
config.set("1468546770034581", "gating", {"gatings":[{"name":"content_type_opt","passed":true},{"name":"experiment_xhr_vs_fetch","passed":true},{"name":"read_nested_event_id","passed":true},{"name":"offsite_clo_beta_event_id_coverage","passed":false},{"name":"enable_product_variant_id","passed":true},{"name":"enable_shopify_additional_events","passed":false},{"name":"enable_shopify_search_contents","passed":false},{"name":"enable_shopify_payment_fields","passed":false},{"name":"enable_shopify_external_id","passed":false},{"name":"dpo_country_state_validation","passed":false}]});
|
||||
fbq.loadPlugin("gating");
|
||||
instance.optIn("1468546770034581", "Gating", true);
|
||||
fbq.loadPlugin("automaticparameters");
|
||||
instance.optIn("1468546770034581", "AutomaticParameters", true);
|
||||
config.set("1468546770034581", "botblocking", {"rules":{"spider_bot_rules":"01job\n0abot\n0agentname\n0apachebench\n0applesyndication\n0ask jeeves\n0ask+jeeves\n0atomz\n0avantgo\n0baiduspider\n0blitzbot\n0bloglines\n0bordermanager\n0changedetection\n0check_http\n0checkurl\n0chkd\n0contype\n0Download Ninja\n0Download+Ninja\n0dts agent\n0dts+agent\n0favorg\n0getright\n0golem\n0gomezagent\n0googlebot\n0grabber\n0ia_archive\n0ichiro\n0IEAutoDiscovery\n0indy library\n0indy+library\n0infolink\n0internet ninja\n0internet+ninja\n0internetseer\n0isilo\n0jakarta\n0jobo\n0justview\n0keynote\n0larbin\n0libwww-perl\n0linkbot\n0linkchecker\n0linklint\n0linkscan\n0linkwalker\n1lwp\n0lydia\n0magus bot\n0magus+bot\n0mediapartners-google\n0mfc_tear_sample\n0microsoft scheduled cache content download service\n0microsoft url control\n0microsoft+scheduled+cache+content+download+service\n0microsoft+url+control\n0miva\n0mj12bot\n0monitor\n0mozilla\/5.0 (compatible; msie 5.0)\n0mozilla\/5.0+(compatible;+msie+5.0)\n0ms frontpage\n0MS Search\n0ms+frontpage\n0MS+Search\n0MSNPTC\n0nbot\n1ng\/2.0\n0nutch\n0nutscrape\n0ocelli\n0patric\n0pluck\n0plumtree\n0powermarks\n0psbot\n0rpt-http\n0rssreader\n0scooter\n0seekbot\n0sherlock\n0shopwiki\n0slurp\n0sucker\n0templeton\n0\/teoma\n0thunderstone\n0t-h-u-n-d-e-r-s-t-o-n-e\n0topix\n0ukonline\n0ultraseek\n0urchin\n0vagabondo\n0web downloader\n0web+downloader\n0webauto\n0webcapture\n0webcheck\n0WebCopier\n0webtool\n0wget\n0xenu\n0yacy\n0zealbot\n0zeusbot\n0ez publish link validator\n0ez+publish+link+validator\n0Goldfire\n0SiteVigil\n0iOpus\n0Microsoft BITS\n0Microsoft+BITS\n0heritrix\n0yahoofeedseeker\n0internal zero-knowledge agent\n0internal+zero-knowledge+agent\n0SurveyBot\/\n0Liferea\n0YahooSeeker\n0FindLinks\n0oodlebot\n0AdsBot-Google\n0KHTE\n0KTXN\n0Advanced Email Extractor\n0Advanced+Email+Extractor\n0webbot\n0panscient.com\n0Snoopy\n0bot\/1.0\n0UniversalSearch\n0Maxamine\n0Argus\n0Google Wireless Transcoder\n0Google+Wireless+Transcoder\n0ClickAJob\n0JobRapido\n0Python-urllib\n0http:\/\/bot.ims.ca\n0System Center Operations Manager\n0System+Center+Operations+Manager\n0JoeDog\n0websitepulse\n0BitvoUserAgent\n0Mozilla\/4.0 (compatible; MSIE 6.0; Windows NT 5.1;1813)\n0Mozilla\/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;1813)\n0Paros\n0Watchmouse\n0proximic\n0Scoutjet\n0Twiceler\n0Pingdom\n0Europarchive\n0Webmetrics\n0holmes\n0AlertSite\n0Yahoo Pipes\n0Yahoo+Pipes\n0SimplePie\n0Drupal\n0HTMLParser\n0SnapPreviewBot\n1FDM 3.x\n1FDM+3.x\n0Trovit\n0RiverglassScanner\n0Wepbot\n0Siteimprove\n0archive.org\n0VocusBot\n0BLP_bbot\n0W3C_Validator\n0Dotbot\n0(simulated_by_Webserver_Stress_Tool)\n0Linguee Bot\n0Linguee+Bot\n0WAPT\n0updatepatrol\n0SiteCon\n0twitterbot\n0richmetrics.com\/bot\n0bingbot\n0WWW-Mechanize\n0Google Web Preview\n0Google+Web+Preview\n0ADGBOT\n0httpunit\n0HttpComponents\n0Twisted PageGetter\n0Twisted+PageGetter\n0AppEngine-Google\n0YioopBot\n0Flamingo_SearchEngine\n0Atomic_Email_Hunter\n0FeedBurner\n0talktalk.co\n0facebookexternalhit\n0adbeat\n1SJN\n0outbrain\n0TweetmemeBot\n0WASALive\n0wikiwix-bot\n0Ezooms\n0HiScan\n0d24y-aegis\n0Google-HotelAdsVerifier\n0FupBot\n0moatbot\n0VMCbot\n0companydatatree\n0CookieReports\n0BingPreview\n1Scan\n0flamingosearch\n0Reconnoiter\n0Funnelback\n0Feed43\n0auditbot\n0Genieo\n0NerdByNature\n0Python-httplib\n0Cutbot\n0Server Density External Llama\n0Server+Density+External+Llama\n0MNA Digital Circonus Check\n0MNA+Digital+Circonus+Check\n0scanalert\n0catchpoint\n0discoverybot\n0Jooblebot\n0bitlybot\n0ADR)\n0YottaaMonitor\n0AdometryBot\n0TSMbot\n0PhantomJS\n0tagscanner\n0LoadImpactPageAnalyzer\n0CFSCHEDULE\n0searchme.com\/support\/\n0MetaURI\n0cXensebot\n0linkdex\n0SearchBot\n0ColdFusion\n0Open Web Analytics Bot\n0Open+Web+Analytics+Bot\n0YahooExternalCache\n0HP SiteScope\n0HP+SiteScope\n0Nielsen\n0Feedzilla\n0Superfeedr\n1Java\/\n0MixrankBot\n0Squider\n0topsy.com\/butterfly\/\n0Neustar\n1InAGist URL Resolver\n1InAGist+URL+Resolver\n1Crowsnest\/\n1kraken\/\n1JS-Kit URL Resolver\n1JS-Kit+URL+Resolver\n1python-requests\/\n1Scrapy\/\n0imgsizer\n0PTST\n0WeSEE:Search\n0ContextAd Bot\n0ContextAd+Bot\n0ADmantX\n0Google-HTTP-Java-Client\n0YahooCacheSystem\n0Typhoeus\n0Twikle\n0EbuzzingFeedBot\n0Cliqzbot\n0CrystalSemanticsBot\n0Livelapbot\n0evidon\n0automationtest\n0WeSEE:Ads\/\n0riddler.io\n0LongURL API\n0LongURL+API\n0LOCKSS cache\n0LOCKSS+cache\n0Go 1.1 package http\n0Go+1.1+package+http\n0google_partner_monitoring\n0SiteExplorer\n0A6-Indexer\n0VigLink\n0HTTP_Request2\n0binlar\n0BUbiNG\n0spbot\n0LinkTiger\n0newspaper\/0.0.\n0twibble.io\n0GoogleSecurityScanner\n0RKG Url Verifier\n0RKG+Url+Verifier\n0MaxPoint Bot\n0MaxPoint+Bot\n1Worldwatch\/\n1WebNotifier\/\n0oia.OWA\n0Google Page Speed Insights\n0Google+Page+Speed+Insights\n0Site24x7\n0RediffNewsBot\n0WinHttpRequest\n0aiHitBot\n0help.coccoc.com\n0Adsense-Snapshot-Google\n0prerender\n0COMODO SSL Checker\n0COMODO+SSL+Checker\n0RuxitSynthetic\n0EngageBDR\n0intergator\n0Yahoo Ad Monitoring\n0Yahoo+Ad+Monitoring\Line truncated
|
||||
fbq.loadPlugin("botblocking");
|
||||
instance.optIn("1468546770034581", "BotBlocking", true);
|
||||
fbq.loadPlugin("pagemetadata");
|
||||
instance.optIn("1468546770034581", "PageMetadata", true);
|
||||
fbq.loadPlugin("websiteperformance");
|
||||
instance.optIn("1468546770034581", "WebsitePerformance", true);instance.configLoaded("1468546770034581"); }});
|
||||
|
After Width: | Height: | Size: 73 KiB |
@@ -0,0 +1 @@
|
||||
var configuration_map = {"notificationRuleList":[],"config":{"enableNotification":true},"passKey":"{}"};
|
||||
@@ -0,0 +1,2 @@
|
||||
!function(){"use strict";function t(t){return t&&t.t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,i;function n(){if(i)return e;i=1,e=function(e,i,s){"function"==typeof i&&(s=i,i={}),i||(i={});var o,a,r=i.prefix||"__jp",c=i.name||r+t++,l=i.param||"callback",u=null!=i.timeout?i.timeout:6e4,h=encodeURIComponent,d=document.getElementsByTagName("script")[0]||document.head;function g(){o.parentNode&&o.parentNode.removeChild(o),window[c]=n,a&&clearTimeout(a)}return u&&(a=setTimeout(function(){g(),s&&s(new Error("Timeout"))},u)),window[c]=function(t){g(),s&&s(null,t)},e=(e+=(~e.indexOf("?")?"&":"?")+l+"="+h(c)).replace("?&","?"),(o=document.createElement("script")).src=e,d.parentNode.insertBefore(o,d),function(){window[c]&&g()}};var t=0;function n(){}return e}const s=t(n()),o="Email",a="Push",r="ChromePush",c="Email",l="SMS",u="SafariPush",h="SafariLegacyPush",d="FirefoxPush",g="chrome",p="edge",w="safari",f="firefox",b=[{i:"Opera",o:/(?:opera|opr|opios)/i,l:/(?:opera|opr|opios)[ /](\d+(?:\.\d+)?)/i},{i:"Facebook",o:/FBAN\//i,l:/FBAV\/(\d+(?:\.\d+)?)/i},{i:"Samsung Browser",o:/samsungbrowser/i,l:/samsungbrowser[ /](\d+(?:\.\d+)?)/i},{i:"Yandex Browser",o:/yabrowser/i,l:/yabrowser[ /](\d+(?:\.\d+)?)/i},{i:"Vivaldi",o:/vivaldi/i,l:/vivaldi[ /](\d+(?:\.\d+)?)/i},{i:"UC Browser",o:/ucbrowser/i,l:/ucbrowser[ /](\d+(?:\.\d+)?)/i},{i:"Microsoft Edge",o:/edg/i,l:/edg[ /](\d+(?:\.\d+)?)/i},{i:"Firefox",o:/firefox|iceweasel|fxios/i,l:/(?:firefox|iceweasel|fxios)[ /](\d+(?:\.\d+)?)/i},{i:"Chromium",o:/chromium/i,l:/chromium[ /](\d+(?:\.\d+)?)/i},{i:"Chrome",o:/chrome|crios|crmo/i,l:/(?:chrome|crios|crmo)[ /](\d+(?:\.\d+)?)/i},{i:"Safari",o:/safari|applewebkit/i,l:/version[ /](\d+(?:\.\d+)?)/i}];function m(t){for(const e of b)if(e.o.test(t)){const i=t.match(e.l)?.[1]??"";return{name:e.i,version:i}}return{name:"Unknown",version:""}}const y=t=>!/like android/i.test(t)&&/android/i.test(t),S=t=>t.match(/(iphone|ipod|ipad)/i)?.[1]?.toLowerCase()||"";function v(t=navigator.userAgent){const e=S(t);return/tablet/i.test(t)&&!/tablet pc/i.test(t)||"ipad"===e||y(t)&&!/[^-]mobi/i.test(t)||!/nexus\s*[0-6]\s*/i.test(t)&&/nexus\s*\d+/i.test(t)}function O(t=navigator.userAgent){if(v(t))return!1;const e=S(t);return/[^-]mobi/i.test(t)||"iphone"===e||"ipod"===e||y(t)}const k={Chrome:g,Chromium:g,Firefox:f,"Microsoft Edge":p,Safari:w};function I(){return k[m(navigator.userAgent).name]||"other"}const x=()=>{const t=m(navigator.userAgent).version;if(!t)return-1;const[e,i="0"]=t.split(".");return+`${e}.${i}`};function C(){const t=I(),e=x();return t===f&&e>=72||t===w&&e>=12.1}const _="160510",E=()=>"undefined"!=typeof window,$=()=>E()&&void 0!==window.safari,P=()=>"undefined"!=typeof navigator&&"serviceWorker"in navigator,T="Browser",N=()=>E()&&null!=window.safari?.pushNotification,M="undefined"!=typeof PushSubscriptionOptions&&PushSubscriptionOptions.prototype.hasOwnProperty("applicationServerKey"),A=({action:t,legacy:e=!1}={})=>new URL(e?"https://onesignal.com/api/v1/":"https://api.onesignal.com/"),D=()=>I()===f?d:I()===w&&M&&!N()?u:N()?h:r;function U(){return String(x())}function B(){return navigator.platform}const L="set-alias",R="delete-alias",W="set-property",F="refresh-user",j="login-user",K="create-subscription",z="update-subscription",V="delete-subscription",H="transfer-subscription",q="custom-event",G="external_id",J="onesignal_id";class Y extends Error{status;statusText;constructor(t,e){super("Registration of a Service Worker failed."),this.status=t,this.statusText=e}}class Q extends Error{reason;constructor(t){let e;switch(t){case 1:e="Invalid email";break;case 0:e="Invalid sms";break;case 2:e="Invalid email & sms"}super(e),this.reason=t}}const Z=new Error("Missing app ID"),X=new Error("Retry limit reached"),tt=new Error("Permission blocked"),et=new Error("AppID doesn't match existing apps"),it=new Error("Safari web platform must be enabled"),nt=t=>new Error(`Channel '${t}' already exists`),st=t=>new Error(`"${t}" is empty`),ot=t=>new Error(`"${t}" is malformed`),at=t=>new Error(`"${t}" is the wrong type`);function rt(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function ct(t,e){if(e&&e.allowNull&&null===t)return!0;if(e&&e.allowEmpty&&null==t)return!0;try{const i=new URL(t);return!e||!e.requireHttps||"https:"===i.protocol}catch(i){return!1}}function lt(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(t)}function ut(t){return new Promise(e=>setTimeout(e,t))}function ht(){return Promise.resolve()}function dt(t,e){return null!=t?t:e}function gt(){return location.origin}class pt{static u(){try{const t=window.localStorage.getItem("loglevel");return"trace"===t?.toLowerCase()}catch(t){return!1}}static h(t){try{window.localStorage.setItem("loglevel",t)}catch(e){console.error(e)}}static p(t){return(...e)=>{(this.u()||"error"===t)&&console[t](...e)}}static m=pt.p("debug");static S=pt.p("info");static v=pt.p("warn");static O=pt.p("error")}function wt(t,e,i){return mt("POSTLine truncated
|
||||
//# sourceMappingURL=OneSignalSDK.page.es6.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
!function(){"use strict";"undefined"!=typeof PushSubscriptionOptions&&PushSubscriptionOptions.prototype.hasOwnProperty("applicationServerKey")||void 0!==window.safari&&void 0!==window.safari.pushNotification?function(){const n=document.createElement("script");n.src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.es6.js?v=160510",n.defer=!0,document.head.appendChild(n)}():function(){let n="Incompatible browser.";"Apple Computer, Inc."===navigator.vendor&&navigator.maxTouchPoints>0&&(n+=" Try these steps: https://tinyurl.com/bdh2j9f7"),console.info(n)}()}();
|
||||
//# sourceMappingURL=OneSignalSDK.page.js.map
|
||||
@@ -0,0 +1 @@
|
||||
window.google_ad_status = 1;
|
||||
@@ -0,0 +1,220 @@
|
||||
|
||||
var mult_send = 0;
|
||||
|
||||
function Contest_Send(){
|
||||
|
||||
mult_send = mult_send + 1;
|
||||
PreparaContestSend('senduscontestform',false);
|
||||
|
||||
if (mult_send == 1)
|
||||
{
|
||||
AJAXReqContestSend("POST","send_us_contest.php",true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function PreparaContestSend(nome,ele){
|
||||
stringa = "";
|
||||
var form = document.forms[nome];
|
||||
|
||||
var numeroElementi = form.elements.length;
|
||||
|
||||
for(var i = 0; i < numeroElementi; i++){
|
||||
|
||||
nmfrm = form.elements[i].name;
|
||||
|
||||
if(i < numeroElementi-1)
|
||||
{
|
||||
stringa += form.elements[i].name+"="+encodeURIComponent(form.elements[i].value)+"&";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
stringa += form.elements[i].name+"="+encodeURIComponent(form.elements[i].value);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function AJAXReqContestSend(method,url,bool){
|
||||
if(window.XMLHttpRequest){
|
||||
myReq = new XMLHttpRequest();
|
||||
} else
|
||||
|
||||
if(window.ActiveXObject){
|
||||
myReq = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
|
||||
if(!myReq){
|
||||
myReq = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
}
|
||||
|
||||
if(myReq){
|
||||
|
||||
myReq.onreadystatechange = state_ContestSend;
|
||||
|
||||
myReq.open(method,url,bool);
|
||||
|
||||
|
||||
myReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
|
||||
myReq.send(stringa);
|
||||
|
||||
}else{
|
||||
alert("Impossibilitati ad usare AJAX");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function state_ContestSend(bReload){
|
||||
|
||||
if (myReq.readyState==4){
|
||||
|
||||
mult_send = 0;
|
||||
|
||||
if (myReq.status==200){
|
||||
|
||||
ResponseContestSend(myReq.responseText);
|
||||
}
|
||||
else {
|
||||
if (bDebug) {alert("Problem retrieving XML data");}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function ResponseContestSend(sResponse){
|
||||
|
||||
|
||||
var vetResp = sResponse.split('|');
|
||||
|
||||
if (vetResp[0].toUpperCase() == 'OK')
|
||||
{
|
||||
if (MM_findObj("contest_name_msg"))
|
||||
{
|
||||
DisplayHTMLData(MM_findObj('contest_name_msg'), ' ');
|
||||
}
|
||||
if (MM_findObj("contest_video_msg"))
|
||||
{
|
||||
DisplayHTMLData(MM_findObj('contest_video_msg'), ' ');
|
||||
}
|
||||
if (MM_findObj("send_box_contest"))
|
||||
{
|
||||
MM_findObj("send_box_contest").style.display='none';
|
||||
}
|
||||
if (MM_findObj("send_box_contest_response"))
|
||||
{
|
||||
MM_findObj("send_box_contest_response").style.display='block';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (MM_findObj("contest_name_msg"))
|
||||
{
|
||||
DisplayHTMLData(MM_findObj('contest_name_msg'), ' ');
|
||||
}
|
||||
if (MM_findObj("contest_video_msg"))
|
||||
{
|
||||
DisplayHTMLData(MM_findObj('contest_video_msg'), ' ');
|
||||
}
|
||||
for (b=1; b<vetResp.length; b++)
|
||||
{
|
||||
var f = vetResp[b].split(';');
|
||||
var fldcont = f[0];
|
||||
var msgcont = f[1];
|
||||
|
||||
if (fldcont == 'contest_name')
|
||||
{
|
||||
DisplayHTMLData(MM_findObj(fldcont + '_msg'), msgcont);
|
||||
}
|
||||
|
||||
if (fldcont == 'contest_video')
|
||||
{
|
||||
DisplayHTMLData(MM_findObj(fldcont + '_msg'), msgcont);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var HTTP_FIRSTAUCT_URL = new String ('first_auct.php');
|
||||
var xmlhttpFirstAuct = null;
|
||||
|
||||
function FirstAuct() {
|
||||
|
||||
var sUrlFirstAuct = HTTP_FIRSTAUCT_URL + "?chk=" + new Date().valueOf();
|
||||
|
||||
if (xmlhttpFirstAuct) {
|
||||
|
||||
if ((xmlhttpFirstAuct.readyState != 4) && (xmlhttpFirstAuct.readyState != 0)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (window.XMLHttpRequest){
|
||||
|
||||
xmlhttpFirstAuct = new XMLHttpRequest();
|
||||
} else if (window.ActiveXObject){
|
||||
|
||||
xmlhttpFirstAuct = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
if (xmlhttpFirstAuct != null){
|
||||
xmlhttpFirstAuct.onreadystatechange = state_FirstAuct;
|
||||
xmlhttpFirstAuct.open("GET",sUrlFirstAuct,true);
|
||||
xmlhttpFirstAuct.send(null);
|
||||
return true;
|
||||
} else {
|
||||
if (bDebug)
|
||||
{
|
||||
alert("Your browser does not support XMLHTTP.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
xmlhttpFirstAuct = null;
|
||||
if (bDebug) alert('Errore in loadXMLDocElenco');
|
||||
}
|
||||
finally {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function state_FirstAuct(){
|
||||
|
||||
if (xmlhttpFirstAuct.readyState==4){
|
||||
|
||||
if (xmlhttpFirstAuct.status!=200){
|
||||
|
||||
if (bDebug) {
|
||||
alert("Problem retrieving XML data");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- saved from url=(0231)https://www.google.com/recaptcha/enterprise/anchor?ar=1&k=6LcjhUMpAAAAADxcuxrNs1Ou0iKbz2h3dn58Egnw&co=aHR0cHM6Ly9pdC5iaWRvby5jb206NDQz&hl=it&v=TkacYOdEJbdB_JjX802TMer9&size=invisible&anchor-ms=20000&execute-ms=15000&cb=bqz19uym1h4r -->
|
||||
<html dir="ltr" lang="it"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>reCAPTCHA</title>
|
||||
<style type="text/css">
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu5mxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7mxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4WxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7WxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fCRc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fABc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fCBc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fBxc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fCxc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fChc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fBBc4.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmYUtfCRc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmYUtfABc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmYUtfCBc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmYUtfBxc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmYUtfCxc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmYUtfChc4EsA.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmYUtfBBc4.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="./styles__ltr.css">
|
||||
<script nonce="" type="text/javascript">window['__recaptcha_api'] = 'https://www.google.com/recaptcha/enterprise/';</script>
|
||||
<script type="text/javascript" src="./recaptcha__it.js.download" nonce="">
|
||||
|
||||
</script></head>
|
||||
<body><div id="rc-anchor-alert" class="rc-anchor-alert"></div>
|
||||
<input type="hidden" id="recaptcha-token" value="03AFcWeA74YX2ICyXDmtirwAgwZMe2CBuvalEtEc8ZP99Hgn2dD-a44Cv9zLjZAI1QSKv0uhvGMo5V65zzXHY_cBgGO7s5ocei3p4fusBZBLQBNFpHQvEd2nZHWuk9Ir-Z0sb1etdd9i0UZvB1q07iw8XNpPQgnd3nJeEMqA7rvUU-dTEa8ytjX3twuzxPg-dIB3ZtjTooJnvBTSXruPpGPfA0yXYzdCBuD71lyYS0U27FHeGN6vjS39Psh4W9u6HINDaBix3O-eUq4y2q06euZczUgCdddkxyLiFkFGark_xOklhTifM3qPtiF3ZN-F5SXy3jYc-RbWKEGvojFYSsw7sdh78tPYGwVdZmDa1Vh78Bx9QE7A_hReH7ktYvecRVlTGhtP6ZbVa3axHlUitTamVbQ85uuhUAjAvCmSq-Ezz7P2If1OL55Q4Rd7X8uOJ7fbuuRxveKgaolmowrFgw1EPyO1oMqPucBucl6jlOrNnneP1UfqaqxDAybOFWXQXG0dzSWlH-OXQ86SwzSfqVzgZGCR1RBse_33emGDOf_sRTAAMgdToNu1GIOQKvmqpBFDjJLZQM0CN7kvj35qTJog6kz-p62VVH1qtG0-V0hP807xJqjNBL7EHgLD11M1z8trqqpkrn26KqTS2Mhpt8H86GuL_ma12sGljO2zH1CabLIrEiclLNx1l8ej0OqpBt-6mRD2dqLdHpEFpzwRwF2CMSVes-3mKo28udelI_pvUn1z6DjkSRsvfk_U9DAp88ioELVk1fvKpHYKmWQzDlQx-3lzCKyziVhnAa5tk1twAzQDUTWtsIsqBZC55k48gLVtS9ZWMH63AkEKGRDzBn9Jgycg9ioLTY4DrrMX7c_e_df5E9NEyBThM8ySI2RBOshZ-3VTu2pKiZVg2bi-qqREiC1nGgAgGWinLUiQeSVqjQ_i2CeIsQyH9il1MTvDs2lSApyMf-mWFIprX_Skw_j5sWdBunswrZhR3mke3ixU-Xe9on0VtarzQGkDFWkk9yDddV23_MdZVmmx8McIQ-eOjUFzdTk4ggEpgb7qUyccqzs0GDR2ZfA0ARs4eKOv4W0pI4uV3_qMvIQzbPozyPb41He7MpOaMkVRJlYBp_y14PAMCK0o9XK-VSUcHLQoO7dSPfrCpGAC7vi7lBVS04m8WenocAKSMEi8EOEIRBReqQmjdZr-Wlt1iU01uZrZSAWMblFC8UkqqrGRUPvIc8kCxouXKEwczI-XYVAnPf3r3VdZzvKAnn8gTRjtD9xizrJvS2RNH3cj3sArBElsUwyMrdpgN2erv3W6n2vzTl4M_ERDRtp52SKpfxOLlVSJqS4kHK9bzqmfMNpnmBqpJcZXJpCvgVh9J7e4iIbeZyQrvVoya3IUg8-P78JBfAE4-tCaQWCi69KV7BNmWiELGzqAqO8dQerTnKI-7PF8yyMnMifi1AENrHu4r3vIdQFLuS5CfSsQ1KLL-RGqjfMxrqFvfDfYAIag-80Q">
|
||||
<script type="text/javascript" nonce="">
|
||||
recaptcha.anchor.Main.init("[\x22ainput\x22,[\x22bgdata\x22,\x22\x22,\x22LyogQW50aS1zcGFtLiBXYW50IHRvIHNheSBoZWxsbz8gQ29udGFjdCAoYmFzZTY0KSBZbTkwWjNWaGNtUXRZMjl1ZEdGamRFQm5iMjluYkdVdVkyOXQgKi8gKGZ1bmN0aW9uKCl7dmFyIFA9ZnVuY3Rpb24oZSxIKXtpZihIPShlPW51bGwsaCkudHJ1c3RlZFR5cGVzLCFIfHwhSC5jcmVhdGVQb2xpY3kpcmV0dXJuIGU7dHJ5e2U9SC5jcmVhdGVQb2xpY3koImJnIix7Y3JlYXRlSFRNTDpGLGNyZWF0ZVNjcmlwdDpGLGNyZWF0ZVNjcmlwdFVSTDpGfSl9Y2F0Y2goWil7aC5jb25zb2xlJiZoLmNvbnNvbGUuZXJyb3IoWi5tZXNzYWdlKX1yZXR1cm4gZX0sRj1mdW5jdGlvbihlKXtyZXR1cm4gZX0saD10aGlzfHxzZWxmOygwLGV2YWwpKGZ1bmN0aW9uKGUsSCl7cmV0dXJuKEg9UCgpKSYmZS5ldmFsKEguY3JlYXRlU2NyaXB0KCIxIikpPT09MT9mdW5jdGlvbihaKXtyZXR1cm4gSC5jcmVhdGVTY3JpcHQoWil9OmZ1bmN0aW9uKFope3JldHVybiIiK1p9fShoKShBcnJheShNYXRoLnJhbmRvbSgpKjc4MjR8MCkuam9pbigiXG4iKStbJyhmdW5jdGlvbigpey8qJywKJycsCicgQ29weXJpZ2h0IEdvb2dsZSBMTEMnLAonIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wJywKJyovJywKJ3ZhciBlbD1mdW5jdGlvbihlLEgpe3JldHVybihIPUQoZSksSCYxMjgpJiYoSD1IJjEyN3xEKGUpPDw3KSxIfSxTPWZ1bmN0aW9uKGUsSCxGLGgpe2ZvcihoPShGPShlfDApLTEsW10pO0Y+PTA7Ri0tKWhbKGV8MCktMS0oRnwwKV09SD4+Rio4JjI1NTtyZXR1cm4gaH0scT10aGlzfHxzZWxmLFp4PWZ1bmN0aW9uKGUsSCxGLGgpe3JldHVybiBUKEYsKEhMKEYsKChoPVQoRiwzNyksRi5JJiZoPEYuTik/KG0oMzcsRixGLk4pLGkxKGUsRikpOm0oMzcsRixlKSxIKSksbSgzNyxGLGgpLDE1OSkpfSxoSz1mdW5jdGlvbihlLEgsRil7cmV0dXJuIGUuS1MoZnVuY3Rpb24oaCl7Rj1ofSxmYWxzZSxIKSxGfSxnPWZ1bmN0aW9uKGUsSCxGLGgsSyxQLEEsdyl7dz10aGlzO3RyeXtGMihGLFAsaCxILGUsdGhpcyxBLEspfWNhdGNoKFcpe2YodGhpcyxXKSxoKGZ1bmN0aW9uKHope3oody5LKX0pfX0sVSxQTD1mdW5jdGlvbihlLEgsRixoLEspe2ZvcihGPShoPUZbMl18KEs9MCwwKSxGWzNdfDApO0s8MTQ7SysrKWU9ZT4+Pjh8ZTw8MjQsZSs9SHwwLGVePWgrMzAyNyxIPUg8PDN8SD4+PjI5LEhePWUsRj1GPj4+OHxGPDwyNCxGKz1ofDAsaD1oPDwzfGg+Pj4yOSxGXj1LKzMwMjcsaF49RjtyZXR1cm5bSD4+PjI0JjI1NSxIPj4+MTYmMjU1LEg+Pj44JjI1NSxIPj4+MCYyNTUsZT4+PjI0JjI1NSxlPj4+MTYmMjU1LGU+Pj44JjI1NSxlPj4+MCYyNTVdfSxPcD1mdW5jdGlvbihlLEgsRixoKXtmb3IoO0guaC5sZW5ndGg7KXtoPShILkE9bnVsbCxIKS5oLnBvcCgpO3RyeXtGPUtXKEgsaCl9Y2F0Y2goSyl7ZihILEspfWlmKGUmJkguQSl7KGU9SC5BLGUpKGZ1bmN0aW9uKCl7RSh0cnVlLEgsdHJ1ZSl9KTticmVha319cmV0dXJuIEZ9LGwxPWZ1bmN0aW9uKGUsSCxGLGgpe3koZSxTKEgsKGg9KEY9dihlKSx2KGUpKSxUKShlLEYpKSxoKX0sZDE9ZnVuY3Rpb24oZSxIKXtyZXR1cm4gSD0wLGZ1bmN0aW9uKCl7cmV0dXJuIEg8ZS5sZW5ndGg/e2RvbmU6ZmFsc2UsdmFsdWU6ZVtIKytdfTp7ZG9uZTp0cnVlfX19LGkxPWZ1bmN0aW9uKGUsSCl7SC5ILmxlbmd0aD4xMDQ/WShILDAsW2EsMzZdKTooSC5ILnB1c2goSC5SLnNsaWNlKCkpLEguUlszN109dm9pZCAwLG0oMzcsSCxlKSl9LER4PWZ1bmN0aW9uKGUsSCxGLGgpe3RyeXtoPWVbKChIfDApKzIpJTNdLGVbSF09KGVbSF18MCktKGVbKChIfDApKzEpJTNdfDApLShofDApXihIPT0xP2g8PEY6aD4+PkYpfWNhdGNoKEspe3Rocm93IEs7fX0sJHM9ZnVuY3Rpb24oZSxILEYsaCxLLFApe2ZvcihQPXYoKEs9KCgoRj0oSD1lW0FLXXx8e30sdikoZSksSCkueXg9dihlKSxIKS5VPVtdLGUuVj09ZSk/KEQoZSl8MCktMToxLGUpKSxoPTA7aDxLO2grKylILlUucHVzaCh2KGUpKTtmb3IoSC5ONT1UKGUsRiksSC5qSj1UKGUsUCk7Sy0tOylILlVbS109VChlLEguVVtLXSk7cmV0dXJuIEh9LGpsPWZ1bmN0aW9uKGUsSCxGKXtpZihlLmxlbmd0aD09Myl7Zm9yKEY9MDtGPDM7RisrKUhbRl0rPWVbRl07Zm9yKEY9WzEzLDgsMTMsMTIsMTYsNSwoZT0wLDMpLDEwLDE1XTtlPDk7ZSsrKUhbM10oSCxlJTMsRltlXSl9fSxuPWZ1bmN0aW9uKGUsSCxGKXttKGUsRixIKSxIW0xXXT0yNzk2fSxYLEYyPWZ1bmN0aW9uKGUsSCxGLGgsSyxQLEEsdyxXLHope2ZvcihXPSh6PShQLlpNPShQLnhjPVdMKFAuZyx7Z2V0OihQLnVBPVBbR10sUC50WD13MSxQLnpSPVNsLGZ1bmN0aW9uKCl7cmV0dXJuIHRoaXMuY29uY2F0KCl9KX0pLE0pW1AuZ10oUC54Yyx7dmFsdWU6e3ZhbHVlOnt9fX0pLFtdKSwwKTtXPDM2MjtXKyspeltXXT1TdHJpbmcuZnJvbUNoYXJDb2RlKFcpO2lmKChQLkdSPSgoUC5uUz0oUC5OPTAsZmFsc2UpLChQLmw9dm9pZCAwLFApLlI9KFAuVz0wLFAuWj0wLFAuSD1bXSxbXSksUC5HPSgoUC5SbD1ILFAudT0wLFAuRj0oUC5ZPTEsZmFsc2UpLFAuSlg9dm9pZCAwLFApLlg9dm9pZCAwLFAuTD1bXSxQLks9KFAuY0g9W10sdm9pZCAwKSwwKSwoVz13aW5kb3cucGVyZm9ybWFuY2V8fHt9LFAuRmo9MCwoUC5EPTAsUCkuaD0oUC5BPW51bGwsUC5wUz1bXSxQLkVtPTEwMDAxLFtdKSwoUC5pQT1bXSxQKS5mUz0oKFAubz1mYWxzZSxQKS5CSD1mYWxzZSxLKSxQLlhqPWZhbHNlLFAuZzM9dm9pZCAwLFAuQz12b2lkIDAsUC5sQT0yNSxQLlY9UCxQLkk9W10sUC5PPXZvaWQgMCxQKS5QPXZvaWQgMCwoUC5WeD0wLFApLmFyPShQLnY9MCwwKSxQKS5pPShQLlBIPWZ1bmN0aW9uKFope3RoaXMuVj1afSxQLmhYPVtdLGZhbHNlKSxXLnRpbWVPcmlnaW58fChXLnRpbWluZ3x8e30pLm5hdmlnYXRpb25TdGFydHx8MCksaCkmJmgubGVuZ3RoPT0yJiYoUC5pQT1oWzFdLFAuY0g9aFswXSksdyl0cnl7UC5KWD1KU09OLnBhcnNlKHcpfWNhdGNoKFope1AuSlg9e319KHgoKChuKDI1MixmdW5jdGlvbihaLE8sbCxkLEwpe2ZvcihMPShsPShkPShPPXYoWiksZWwoWikpLDApLFtdKTtsPGQ7bCsrKUwucHVzaChEKFopKTttKE8sWixMKX0sKG4oODEsZnVuY3Rpb24oWixPLGwsZCxMKXsobD1UKChMPShPPVQoWiwoZD0oTz0oTD0oZD0obD12KFopLHYoWikpLHYoWikpLHYoWikpLFQoWixkKSksTykpLFQoWixMKSksWikuVixsKSxsIT09MCkmJihMPW1nKDEsWixMLE8sbCxkKSxsLmFkZEV2ZW50TGlzdGVuZXIoZCxMLGZXKSxtKDQ2NixaLFtsLGQsTF0pKX0sKG0oODcsKG4oMjM0LChuKDEzMCxmdW5jdGlvbihaKXtwVyhaLDMpfSwobSgyNCwobSgxODAsUCwoUC5ReD0obig0MTgsZnVuY3Rpb24oWixPLGwsZCl7aWYoTz1aLkgucG9wKCkpe2ZvcihsPUQoWik7bD4wO2wtLSlkPXYoWiksT1tkXT1aLlJbZF07Wi5SPSgoT1szNjVdPVouUlszNjVdLE8pWzMzOV09Wi5SWzMzOV0sTyl9ZWxzZSBtKDM3LFosWi5OKX0sKG4oMzk4LGZ1bmN0aW9uKFosTyxsLGQpeyhPPXYoKGw9dihaKSxaKSksZD12KFopLFopLlY9PVomJihPPVQoWixPKSxkPVQoWixkKSxUKFosbClbT109ZCxsPT0yMzEmJihaLkM9dm9pZCAwLE89PTImJihaLlg9UVUoZmFsc2UsMzIsWiksWi5DPXZvaWQgMCkpKX0sKG4oNDM5LChuKDE2NywobigobigxMDksZnVuY3Rpb24oWixPLGwsZCxMLHQscCxWLGMsUixiLE4pe2Z1bmN0aW9uIEMoUSxJKXtmb3IoO2Q8Line truncated
|
||||
</script><div class="rc-anchor rc-anchor-invisible rc-anchor-light rc-anchor-invisible-hover"><div id="recaptcha-accessible-status" class="rc-anchor-aria-status" aria-hidden="true">Recaptcha richiede la verifica. </div><div class="rc-anchor-error-msg-container" style="display:none"><span class="rc-anchor-error-msg" aria-hidden="true"></span></div><div class="rc-anchor-normal-footer"><div class="rc-anchor-logo-large" role="presentation"><div class="rc-anchor-logo-img rc-anchor-logo-img-large"></div></div><div class="rc-anchor-pt"><a href="https://www.google.com/intl/it/policies/privacy/" target="_blank">Privacy</a><span aria-hidden="true" role="presentation"> - </span><a href="https://www.google.com/intl/it/policies/terms/" target="_blank">Termini</a></div></div><div class="rc-anchor-invisible-text"><span>protetto da <strong>reCAPTCHA</strong></span><div class="rc-anchor-pt"><a href="https://www.google.com/intl/it/policies/privacy/" target="_blank" style="">Privacy</a><span aria-hidden="true" role="presentation"> - </span><a href="https://www.google.com/intl/it/policies/terms/" target="_blank" style="">Termini</a></div></div></div><iframe style="display: none;" src="./saved_resource.html"></iframe></body></html>
|
||||
@@ -0,0 +1,129 @@
|
||||
btn-promo {
|
||||
border-radius: 3px;
|
||||
background: linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
|
||||
background: -moz-linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
|
||||
background: -webkit-linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
|
||||
background: -o-linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
|
||||
background: -ms-linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn.btn-promo:hover {
|
||||
background: linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
|
||||
background: -moz-linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
|
||||
background: -webkit-linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
|
||||
background: -o-linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
|
||||
background: -ms-linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mCSB_inside > .mCSB_container {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerRail {
|
||||
width: 6px;
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerContainer {
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
|
||||
background-color: #20cb9a !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loader {
|
||||
margin: 10px auto;
|
||||
border: 5px solid #f3f3f3;
|
||||
/* Light grey */
|
||||
border-top: 5px solid #20cb9a;
|
||||
/* Blue */
|
||||
border-radius: 50%;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
-webkit-animation: spin 2s linear infinite;
|
||||
animation: spin 2s linear infinite;
|
||||
}
|
||||
|
||||
.stopScroll{
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 384px) {
|
||||
#prod_win_cont_modal h3 {
|
||||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 320px) {
|
||||
.prod_won__2 {
|
||||
margin-left: 1px !important;
|
||||
margin-right: 1px !important;
|
||||
}
|
||||
#prod_win_cont_modal .col-xs-6{
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
#modal iframe {
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
#myModal3 .modal-dialog, #myModal2 .modal-dialog {
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
.settingBox form div {
|
||||
border-bottom: 1px solid #efefef;
|
||||
padding: 15px;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
color: #818181;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 991px) {
|
||||
#menuModal .show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#menuModal .modal-header {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#menuModal .height {
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
.parentOverflowY {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
#notifBoxContainer .mCSB_container {
|
||||
top: 0px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,206 @@
|
||||
const AuctionsBidManage = (function() {
|
||||
|
||||
const _defaultPart = "divAsta";
|
||||
let _nAstePerBonus = 10;
|
||||
let _limiteAsteVinte = 10;
|
||||
let _nAstePuntataVinte = 0;
|
||||
let _percentualeBonus = 0;
|
||||
let _nPuntateVinteOggi = 0;
|
||||
let _nAsteConfermate = 0;
|
||||
let _nPuntateRiscattate = 0;
|
||||
let _nPuntateDaRiscattare = 0;
|
||||
let _initialized = false;
|
||||
let _defaultValidUntil = null;
|
||||
let _viewSlot = false;
|
||||
|
||||
function _defaultObj() {
|
||||
return {
|
||||
auctions: {},
|
||||
nAsteConfermate: 0,
|
||||
percentualeBonus: 0,
|
||||
limiteAsteVinte: 10,
|
||||
nAstePerBonus: 10,
|
||||
validUntil: getDefaultValidUntil()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Aggiunge una nuova asta all'oggetto delle aste di puntata vinte in un giorno
|
||||
* @param idAuction {int}
|
||||
*/
|
||||
function add(idAuction){
|
||||
|
||||
let result = get();
|
||||
let retrievedObject = JSON.parse(result);
|
||||
let auctionBidWin = retrievedObject === null ? _defaultObj() : retrievedObject ;
|
||||
let auctionElement = document.getElementById(_defaultPart + idAuction);
|
||||
let creditValue = parseInt(auctionElement.getAttribute('data-credit-value')) > 0 ? parseInt(auctionElement.getAttribute('data-credit-value')) : 0;
|
||||
|
||||
|
||||
|
||||
if(creditValue > 0 && Object.keys(auctionBidWin.auctions).length <= auctionBidWin.limiteAsteVinte){
|
||||
|
||||
// let obj =
|
||||
// {
|
||||
// idAuction: idAuction,
|
||||
// value: creditValue
|
||||
// }
|
||||
// ;
|
||||
//
|
||||
// if(!auctionBidWin.auctions.hasOwnProperty(idAuction)){
|
||||
// auctionBidWin.auctions[idAuction] = obj;
|
||||
// }
|
||||
// let newObj = JSON.stringify(auctionBidWin);
|
||||
//
|
||||
// localStorage.setItem("auctionBidWin", newObj);
|
||||
getRemoteData();
|
||||
}
|
||||
return;
|
||||
}
|
||||
function getDefaultValidUntil(){
|
||||
|
||||
return _defaultValidUntil;
|
||||
|
||||
}
|
||||
|
||||
function setDefaultValidUntil(untilTimestamp){
|
||||
_defaultValidUntil = untilTimestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ritornano le informazioni salvate nel localStorage
|
||||
* @returns {string}
|
||||
*/
|
||||
function get(){
|
||||
return localStorage.getItem('auctionBidWin');
|
||||
}
|
||||
|
||||
/**
|
||||
* Rimuove dal localStorage
|
||||
*/
|
||||
function remove(){
|
||||
localStorage.removeItem('auctionBidWin');
|
||||
}
|
||||
|
||||
|
||||
function getRemoteData(callback = null){
|
||||
|
||||
fetch('./ajax/get_auction_bids_info_banner.php',{
|
||||
method: "GET"
|
||||
})
|
||||
// gestisci il successo
|
||||
.then(response => response.json()) // converti a json
|
||||
.then(function (data) {
|
||||
let obj = {
|
||||
auctions: data.auctions,
|
||||
nAsteConfermate: data.nAsteConfermate,
|
||||
nAsteVinte: data.nAsteVinte,
|
||||
nPuntateRiscattate: data.nPuntateRiscattate,
|
||||
nPuntateDaRiscattare: data.nPuntateDaRiscattare,
|
||||
limiteAsteVinte: data.limiteAsteVinte,
|
||||
nAstePerBonus: data.nAstePerBonus,
|
||||
percentualeBonus: data.percentualeBonus,
|
||||
validUntil: data.validUntil,
|
||||
viewSlot: data.viewSlot,
|
||||
extraSlots: data.extraSlots, //un elenco degli slots non scaduti e non aperti
|
||||
nPuntateBonus: data.nPuntateBonus
|
||||
};
|
||||
let newObj = JSON.stringify(obj);
|
||||
|
||||
localStorage.setItem("auctionBidWin", newObj);
|
||||
if(callback !== null){
|
||||
callback();
|
||||
}
|
||||
|
||||
})
|
||||
.catch(err => console.log('Request Failed', err)); // gestisci gli errori
|
||||
}
|
||||
|
||||
function retriveInfoComponent(){
|
||||
let result = JSON.parse(get());
|
||||
|
||||
if(result) {
|
||||
|
||||
_nAstePuntataVinte = result.nAsteVinte;
|
||||
_limiteAsteVinte = result.limiteAsteVinte;
|
||||
_nAsteConfermate = result.nAsteConfermate;
|
||||
_nPuntateDaRiscattare = result.nPuntateDaRiscattare;
|
||||
_nPuntateRiscattate = result.nPuntateRiscattate;
|
||||
_nAstePerBonus = result.nAstePerBonus;
|
||||
_percentualeBonus = result.percentualeBonus;
|
||||
_viewSlot = result.viewSlot;
|
||||
_nPuntateVinteOggi = result.nPuntateDaRiscattare + result.nPuntateRiscattate;
|
||||
|
||||
|
||||
|
||||
/*if (_percentualeBonus > 0) {
|
||||
let valorePercentualeBonus = ((_nPuntateVinteOggi * _percentualeBonus) / 100);
|
||||
_nPuntateVinteOggi = _nPuntateVinteOggi + valorePercentualeBonus;
|
||||
}*/
|
||||
|
||||
|
||||
let asteRimanentiPerBonus = _nAstePerBonus - _nAstePuntataVinte;
|
||||
|
||||
return {
|
||||
auctions: result.auctions,
|
||||
asteRimanentiPerBonus: asteRimanentiPerBonus,
|
||||
nAstePerBonus: _nAstePerBonus,
|
||||
nAstePuntataVinte: _nAstePuntataVinte,
|
||||
percentualeBonus: _percentualeBonus,
|
||||
nPuntateVinteOggi: parseInt(_nPuntateVinteOggi),
|
||||
limiteAsteVinte: _limiteAsteVinte,
|
||||
nAsteConfermate: _nAsteConfermate,
|
||||
nPuntateDaRiscattare: _nPuntateDaRiscattare,
|
||||
nPuntateRiscattate: _nPuntateRiscattate,
|
||||
|
||||
viewSlot: _viewSlot,
|
||||
extraSlots: result.extraSlots,
|
||||
nPuntateBonus: result.nPuntateBonus
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param auctionId
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function searchByAuctionId(auctionId){
|
||||
let data = retriveInfoComponent();
|
||||
let controllo = false;
|
||||
if(data == undefined || data == null ){ return; }
|
||||
|
||||
let keys = Object.keys(data.auctions);
|
||||
|
||||
for(let i= 0; i <= keys.length; i++){
|
||||
if(keys[i] === auctionId){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function initRemoteData(){
|
||||
if(!_initialized){
|
||||
getRemoteData();
|
||||
setInterval(function (){
|
||||
getRemoteData();
|
||||
}, 1000 * 60);
|
||||
}
|
||||
_initialized = true;
|
||||
|
||||
}
|
||||
|
||||
return {
|
||||
add,
|
||||
get,
|
||||
remove,
|
||||
getRemoteData,
|
||||
retriveInfoComponent,
|
||||
initRemoteData,
|
||||
setDefaultValidUntil,
|
||||
searchByAuctionId
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
@@ -0,0 +1,927 @@
|
||||
#wrapBonusSection{
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20px;
|
||||
-webkit-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.2);
|
||||
-moz-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.2);
|
||||
box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.2);
|
||||
border-top: 1px solid #d0d0d0;
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
#wrapBonusSection.visible{
|
||||
display: block;
|
||||
}
|
||||
#BonusSection{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 65%;
|
||||
min-height: 40px;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
margin-bottom: -25px;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
#BonusSection{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#BonusSection .wrap-msg-bonus, #BonusSection .pt-2 .wrap-progress, #BonusSection .pt-1 .wrap-progress, #BonusSection .pt-3 .wrap-progress, #BonusSection .pt-3 .wrap-bids, #auctionBidsModal .wrap-msg-bonus, #auctionBidsModal .wrap-msg-bonus .wrap-progress, #bidsBonusSection #section2 .wrap-progress, #bidsBonusSection #section3 .wrap-progress{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
#bidsBonusSection #section2 .wrap-progress{
|
||||
font-size: 14px;
|
||||
}
|
||||
#auctionBidsModal #countdownAddSlot{
|
||||
font-weight: bold;
|
||||
color: #55bc62;
|
||||
}
|
||||
#auctionBidsModal .wrap-msg-bonus{
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
#BonusSection .pt-2 .item, #BonusSection .pt-3 .item{
|
||||
margin: 2px;
|
||||
}
|
||||
#BonusSection .pt-2, #BonusSection .pt-1, #BonusSection .pt-3, #auctionBidsModal .wrap-pt2{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
#auctionBidsModal .wrap-pt2 .bonus-obtained{
|
||||
font-size: 12px;
|
||||
color: #6F6F6F;
|
||||
font-weight: bold;
|
||||
margin-top: 3px;
|
||||
display: none;
|
||||
}
|
||||
#auctionBidsModal .wrap-pt2{
|
||||
justify-content: space-around;
|
||||
align-items: flex-start;
|
||||
margin-top: 20px;
|
||||
border-top: 1px solid #DBDBDB;
|
||||
padding-top: 20px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@media (max-width: 340px) {
|
||||
#auctionBidsModal .wrap-pt2{
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
#auctionToBonusModal{
|
||||
font-size: 15px;
|
||||
color: #333;
|
||||
}
|
||||
#BonusSection .text{
|
||||
color: #6D6D6D;
|
||||
font-size: 15px;
|
||||
margin: auto 4px;
|
||||
}
|
||||
#BonusSection .pt-2 img{
|
||||
height: 29px;
|
||||
}
|
||||
#BonusSection .pt-2 .img-emoji img, #auctionBidsModal .img-emoji img {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
margin-left: -10px;
|
||||
margin-top: -3px;
|
||||
}
|
||||
#auctionBidsModal .img-emoji img{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
#auctionBidsModal .img-emoji{
|
||||
z-index: 9;
|
||||
margin-left: -3px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
#BonusSection .pt-dx img, #auctionBidsModal .pt-dx img, #auctionBidsModal .pt-center img{
|
||||
width: 16px;
|
||||
}
|
||||
#BonusSection .pt-2 .wrap-progress .progress{
|
||||
margin-left: 5px;
|
||||
background-color: #D1D1D1;
|
||||
}
|
||||
#auctionBidsModal .progress{
|
||||
width: 56px;
|
||||
height: 24px;
|
||||
margin: 0 6px;
|
||||
position: relative;
|
||||
background-color: #D1D1D1;
|
||||
border-radius: 20px;
|
||||
}
|
||||
#auctionBidsModal .progress{
|
||||
width: 110px;
|
||||
height: 22px;
|
||||
}
|
||||
#auctionBidsModal .pt-1 .progress{
|
||||
height: 11px;
|
||||
}
|
||||
#BonusSection .progress, #auctionBidsModal .progress{
|
||||
width: 60px;
|
||||
height: 13px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
#auctionBidsModal .progress{
|
||||
width: 90px;
|
||||
}
|
||||
#BonusSection #countdown-bonus{
|
||||
width: 60px;
|
||||
color: #fff;
|
||||
background-color: #FF0658;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
padding: 0px 4px;
|
||||
height: 16px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
#BonusSection #bonus-earned, #BonusSection #bonus-active-all{
|
||||
display: none;
|
||||
font-weight: bold;
|
||||
margin-right: 15px;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
#BonusSection #bonus-earned, #BonusSection #bonus-active-all{
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
#BonusSection #bonus-active-all{
|
||||
color: #55bc62;
|
||||
}
|
||||
|
||||
|
||||
#BonusSection .progress .progress-bar, #auctionBidsModal .pt-1 .progress .progress-bar, #auctionBidsModal #bidsBonusSection #section2 .progress .progress-bar, #auctionBidsModal .progress .progress-bar{
|
||||
background: rgb(4,170,176);
|
||||
background: linear-gradient(90deg, rgba(4,170,176,1) 0%, rgba(7,206,173,1) 100%);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#BonusSection .progress .progressbar-text{
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
height: 22px;
|
||||
color: #000;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#auctionBidsModal .progress .progressbar-text{
|
||||
font-size: 15px;
|
||||
top: 0;
|
||||
}
|
||||
#todayBids, #auctionBidsModal{
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
#auctionBidsModal{
|
||||
font-weight: normal;
|
||||
}
|
||||
#auctionToBonus.active{
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
#confirmedAuctionWithBonus{
|
||||
display: none;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#confirmedAuctionWithBonus .value{
|
||||
font-weight: bold;
|
||||
}
|
||||
.wrap-bonus-mobile{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.wrap-bonus-mobile .wrap-bonus-value{
|
||||
font-size: 14px;
|
||||
color: #504E4E;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#auctionBidsModal .wrap-bonus-value{
|
||||
margin-right: 2px;
|
||||
}
|
||||
#BonusSection .pt-3 img{
|
||||
width: 15px;
|
||||
}
|
||||
#BonusSection .wrap-title-bonus{
|
||||
display: flex;
|
||||
}
|
||||
#BonusSection .wrap-title-bonus .icon-check{
|
||||
width: 15px;
|
||||
display: none;
|
||||
margin-right: 4px;
|
||||
}
|
||||
#BonusSection .pt-2 #countdown-bonus{
|
||||
display: none;
|
||||
}
|
||||
@media (max-width: 1040px) {
|
||||
#BonusSection{
|
||||
width: 100%;
|
||||
justify-content: space-around;
|
||||
min-height: 50px;
|
||||
}
|
||||
#BonusSection .pt-1, #BonusSection .pt-2, #BonusSection .pt-3{
|
||||
flex-direction: column;
|
||||
}
|
||||
#BonusSection .pt-3 .wrap-bids{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
#BonusSection .text {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#BonusSection .pt-2 img{
|
||||
margin-right: 5px;
|
||||
height: 18px;
|
||||
width: 10px;
|
||||
}
|
||||
#BonusSection .pt-1 .progress {
|
||||
width: 90px;
|
||||
height: 10px;
|
||||
}
|
||||
#todayBids{
|
||||
font-size: 14px;
|
||||
}
|
||||
#BonusSection .pt-3 .item{
|
||||
margin: 0;
|
||||
}
|
||||
#BonusSection .pt-3 img{
|
||||
width: 13px;
|
||||
margin-top: -1px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
#BonusSection .wrap-msg-bonus{
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.wrap-bonus-mobile{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
#BonusSection {
|
||||
min-height: 45px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 360px) {
|
||||
#BonusSection .text {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#auctionBidsModal .pt-left .wrap-progress, #auctionBidsModal .pt-dx .wrap-bids, #auctionBidsModal .pt-center .wrap-bids{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#auctionBidsModal .pt-center .item, #auctionBidsModal .pt-dx .item{
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
}
|
||||
#auctionBidsModal .pt-center .item img, #auctionBidsModal .pt-dx .item img{
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
#auctionToGoModal{
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
@media (max-width: 340px) {
|
||||
#auctionBidsModal .wrap-pt2{
|
||||
font-size: 12px;
|
||||
}
|
||||
#auctionToGoModal, #todayBidsModal, #todayBidsPayedModal{
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
#todayBidsModal, #todayBidsPayedModal{
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#loaderAuctionBids{
|
||||
min-height: 40px;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
font-size: 20px;
|
||||
}
|
||||
#auctionToGo{
|
||||
color: #000;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.loader-data{
|
||||
display: block;
|
||||
position: relative;
|
||||
margin-right: 0px !important;
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
.loader-data::before{
|
||||
content: "";
|
||||
background-color: #eaeaea;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 22px;
|
||||
position: absolute;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.loader-data{
|
||||
margin-top: 2px !important;
|
||||
margin-bottom: 2px !important;
|
||||
}
|
||||
.loader-data::before{
|
||||
height: 16px;
|
||||
min-width: 20px;
|
||||
}
|
||||
}
|
||||
#BonusSection .pt-1, #BonusSection .pt-2, #BonusSection .pt-3{
|
||||
position: relative;
|
||||
}
|
||||
.loader-data img{
|
||||
display: none !important;
|
||||
}
|
||||
.wrap-countdown-auctionBidsModal{
|
||||
color: #55BC62;
|
||||
font-weight: bold;
|
||||
}
|
||||
#auctionBidsModal .wrapTitle{
|
||||
margin: 20px auto 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
#auctionBidsModal .modal-body{
|
||||
padding: 0;
|
||||
}
|
||||
#auctionBidsModal .contentModal #bidsBonusSection .content, #auctionBidsModal .contentModal #rankingBonusSection{
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
padding: 15px;
|
||||
}
|
||||
#auctionBidsModal .contentModal #bidsBonusSection .content{
|
||||
margin-top: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#auctionBidsModal .contentModal #bidsBonusSection .content.parent-content-div {
|
||||
padding: 0 0 5px 0;
|
||||
}
|
||||
|
||||
#tabsSection{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
#tabsSection{
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
#tabsSection .pt-1{
|
||||
width: 55%;
|
||||
}
|
||||
#tabsSection .pt-2{
|
||||
width: 40%;
|
||||
}
|
||||
#tabsSection .pt-1, #tabsSection .pt-2{
|
||||
|
||||
padding: 8px 18px;
|
||||
border-bottom: 1px solid #BCBCBC;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
#tabsSection .pt-1 .fa, #tabsSection .pt-2 .fa{
|
||||
margin-right: 5px;
|
||||
}
|
||||
#tabsSection .pt-3{
|
||||
width: 10%;
|
||||
padding: 5px 10px;
|
||||
border-bottom: 1px solid #BCBCBC;
|
||||
}
|
||||
button[aria-label='Close'] span{
|
||||
font-size: 26px;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
#tabsSection .pt-3{
|
||||
padding: 4px 10px;
|
||||
}
|
||||
#tabsSection .pt-1, #tabsSection .pt-2{
|
||||
font-size: 12px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
button[aria-label='Close'] span{
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
#tabsSection .pt-1.active, #tabsSection .pt-2.active, #tabsSection .pt-3.active{
|
||||
border-color: #2F80ED;
|
||||
}
|
||||
#tabsSection .pt-1.active a, #tabsSection .pt-2.active a, #tabsSection .pt-3.active a, #tabsSection .pt-1.active a:hover, #tabsSection .pt-2.active a:hover{
|
||||
color: #2F80ED;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
#tabsSection .pt-1 a, #tabsSection .pt-2 a{
|
||||
color: #7d7d7d;
|
||||
}
|
||||
|
||||
|
||||
#tabsSection .pt-1 a:hover, #tabsSection .pt-2 a:hover{
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #2F80ED;
|
||||
}
|
||||
#rankingBonusSection{
|
||||
display: none;
|
||||
}
|
||||
#bidsBonusSection #section2 .box-congrats,
|
||||
#bidsBonusSection #section3 .box-congrats{
|
||||
margin-top: 12px;
|
||||
}
|
||||
#bidsBonusSection #section2, #bidsBonusSection #section3{
|
||||
display: none;
|
||||
}
|
||||
#bidsBonusSection #section2 .titleModal{
|
||||
font-size: 20px;
|
||||
}
|
||||
#auctionBidsModal .wrap-credit-bonus{
|
||||
display: inline-block;
|
||||
}
|
||||
#auctionBidsModal #bidsBonusSection .wrap-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
#bidsBonusSection #section2 .summary-body #countdown-bonus{
|
||||
font-size: 14px;
|
||||
}
|
||||
#bidsBonusSection #section2 .summary-body .countdown{
|
||||
color: #FF0658;
|
||||
}
|
||||
#bidsBonusSection #section2 .summary-body #countdownForBonus{
|
||||
font-weight: bold;
|
||||
}
|
||||
#bidsBonusSection #section2 .summary{
|
||||
margin-top: 30px;
|
||||
}
|
||||
#bidsBonusSection #section2 .summary-body{
|
||||
width: 250px;
|
||||
margin: -18px auto 25px;
|
||||
border: 1px solid #000;
|
||||
border-radius: 5px;
|
||||
padding: 20px 15px;
|
||||
box-shadow: 2px 2px 3px 1px rgba(208, 209, 213, 0.2), 0 2px 2px 1px rgba(220, 221, 224, 0.2);
|
||||
-webkit-box-shadow: 2px 2px 3px 1px rgba(208, 209, 213, 0.2), 0 2px 2px 1px rgba(220, 221, 224, 0.2);
|
||||
-moz-box-shadow: 2px 2px 3px 1px rgba(208, 209, 213, 0.2), 0 2px 2px 1px rgba(220, 221, 224, 0.2);
|
||||
}
|
||||
#bidsBonusSection #section3 .summaryTitle{
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin-top: 40px;
|
||||
|
||||
}
|
||||
#bidsBonusSection #section3 .summaryList img{
|
||||
width: 18px;
|
||||
}
|
||||
#bidsBonusSection #section3 .summaryList ul{
|
||||
text-align: left;
|
||||
width: 300px;
|
||||
margin: 5px auto 20px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.bottom-area{
|
||||
font-size: 16px;
|
||||
}
|
||||
.bottom-area.highlight{
|
||||
color: #FF0658;
|
||||
font-weight: bold;
|
||||
margin-top: 15px;
|
||||
margin-bottom: -10px;
|
||||
}
|
||||
#auctionBidsModal #bidsBonusSection #bonusSection img{
|
||||
width: 20px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
#auctionBidsModal #bidsBonusSection #bonusSection .bottomSection img{
|
||||
width: 16px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
#auctionBidsModal #bidsBonusSection #bonusSection .bottomSection{
|
||||
font-size: 16px;
|
||||
margin-bottom: 15px;
|
||||
color: #5F5F5F;
|
||||
}
|
||||
|
||||
#bonusSection .btnConfirm{
|
||||
font-size: 18px;
|
||||
display: inline-block;
|
||||
color: #333;
|
||||
background-color: #fcc62d;
|
||||
padding: 5px;
|
||||
line-height: 25px;
|
||||
border-radius: 5px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
width: 95%;
|
||||
text-decoration: none;
|
||||
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
#auctionBidsModal #bidsBonusSection #bonusSection .bottomSection {
|
||||
font-size: 15px;
|
||||
}
|
||||
#bonusSection .btnConfirm{
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
#rankingBonusSection .title{
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#rankingBonusSection .subtitle{
|
||||
font-size: 14px;
|
||||
}
|
||||
#rankingBonusSection #ranking{
|
||||
padding: 0 10px;
|
||||
}
|
||||
#rankingBonusSection #ranking table{
|
||||
margin-top:30px;
|
||||
width: 100%;
|
||||
}
|
||||
#rankingBonusSection #ranking table td{
|
||||
text-align: left;
|
||||
}
|
||||
#rankingBonusSection #ranking table .td1{
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
#rankingBonusSection #ranking table .td1 img{
|
||||
width: 38px;
|
||||
}
|
||||
#rankingBonusSection #ranking table td.td2{
|
||||
font-size: 16px;
|
||||
width: 70%;
|
||||
padding: 8px 10px;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
#rankingBonusSection #ranking table td.td3{
|
||||
width: 25%;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
}
|
||||
#rankingBonusSection #ranking table td.td3 img{
|
||||
width: 17px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
#auctionBidsModal #section1, #auctionBidsModal #section4{
|
||||
display: none;
|
||||
}
|
||||
#auctionBidsModal #section1{
|
||||
padding: 0px 20px;
|
||||
}
|
||||
#auctionBidsModal #section4 .sad{
|
||||
width: 25px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#BonusSection .img-lock, #BonusSection .img-lock-open{
|
||||
display: none;
|
||||
}
|
||||
#BonusSection .img-lock img, #BonusSection .img-lock-open img{
|
||||
width: 12px;
|
||||
margin-left: 5px;
|
||||
margin-top: -1px;
|
||||
}
|
||||
#BonusSection .pay-bids-counter{
|
||||
margin-left: 5px;
|
||||
color: #fff;
|
||||
background-color: #FF0658;
|
||||
border-radius: 40px;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
padding: 2px;
|
||||
display: none;
|
||||
}
|
||||
#auctionBidsModal .wrap-new-daily-challenge.wrap2{
|
||||
margin-top: 5px;
|
||||
}
|
||||
#auctionBidsModal .wrap-new-daily-challenge{
|
||||
color: #2F80ED;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin: 20px 60px 0px;
|
||||
display: none;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
#auctionBidsModal .wrap-new-daily-challenge {
|
||||
margin: 20px 40px 0;
|
||||
}
|
||||
}
|
||||
#BonusSection .img-plus-not-active, #BonusSection .img-plus-active{
|
||||
display: none;
|
||||
}
|
||||
#auctionBidsModal .extraSlots .slot-title .open-lock{
|
||||
margin-top: -5px;
|
||||
width: 15px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
#auctionBidsModal .extraSlots .slot-title span .fa{
|
||||
font-size: 20px;
|
||||
position: absolute;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#auctionBidsModal .extraSlots .wrap-content-slot{
|
||||
padding: 10px 0 15px;
|
||||
}
|
||||
#auctionBidsModal .bonus-obtained{
|
||||
display: none;
|
||||
}
|
||||
#auctionBidsModal .extraSlots{
|
||||
border: none;
|
||||
margin: -5px auto 0;
|
||||
padding: 10px 15px;
|
||||
text-align: center;
|
||||
background-color: #f3f6f9;
|
||||
border-radius: 0;
|
||||
border-bottom-left-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
}
|
||||
#auctionBidsModal .extraSlots.avaible{
|
||||
border-color: #55BC62;
|
||||
}
|
||||
#extraSlotTemplate{
|
||||
display: none;
|
||||
}
|
||||
#wrapSlots{
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
#wrapSlots .box-extra-slot{
|
||||
border: 1px solid #6F6F6F;
|
||||
background-color: #f3f6f9;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
width: 100px;
|
||||
margin-top: 15px;
|
||||
display: none;
|
||||
}
|
||||
.wrap-num-other-slot{
|
||||
position: relative;
|
||||
display: none;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.wrap-num-other-slot .reduce{
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 20px;
|
||||
color: #333;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.wrap-num-other-slot .open{
|
||||
color: #55BC62;
|
||||
text-decoration: underline;
|
||||
display: none;
|
||||
}
|
||||
#wrapSlots .box-extra-slot .expire{
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
color: #6A6B6C;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#wrapSlots .box-extra-slot .expire img{
|
||||
margin-left: 2px;
|
||||
}
|
||||
#wrapSlots .box-extra-slot .content{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
#wrapSlots .box-extra-slot .content .slot-value{
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
#wrapSlots .box-extra-slot .wrap-cta .cta{
|
||||
background-color: #B4B4B4;
|
||||
color: #fff;
|
||||
padding: 0px 10px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
max-height: 23px;
|
||||
|
||||
}
|
||||
#wrapSlots .box-extra-slot .wrap-cta .cta img{
|
||||
margin-top: -2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.extraSlots .wrap-content-slot{
|
||||
display: none;
|
||||
}
|
||||
.extraSlots .slot-title a{
|
||||
width: 100%;
|
||||
display: block;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
.extraSlots .slot-title{
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.extraSlots .slot-content{
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.extraSlots .slot-content .beforeConfirmed, .extraSlots .slot-content .afterConfirmed{
|
||||
display: none;
|
||||
}
|
||||
.wrap-extra-slots .box-noSlot .titleNoSlot{
|
||||
color: #FE4E4E;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.wrap-extra-slots .box-noSlot .contentNoSlot{
|
||||
font-size: 12px;
|
||||
}
|
||||
.wrap-extra-slots .box-noSlot .contentNoSlot img{
|
||||
width: 17px;
|
||||
margin-top: -3px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
.wrap-extra-slots .box-noSlot{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.wrap-extra-slots .box-noSlot{
|
||||
display: none;
|
||||
}
|
||||
.wrap-extra-slots .box-noSlot .box-noextra-slot .no-extra-slot-content .slot-img img{
|
||||
width: 20px;
|
||||
opacity: 0.6;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.wrap-extra-slots .box-noSlot .box-noextra-slot .no-extra-slot-content{
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
.wrap-extra-slots .box-noSlot .box-noextra-slot{
|
||||
width: 92px;
|
||||
margin: 20px auto;
|
||||
height: 81px;
|
||||
border: 1px solid #55BC62;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#wrapSlots.avaible .box-extra-slot{
|
||||
border-color: #55BC62;
|
||||
background-color: #EDF8EF;
|
||||
}
|
||||
#wrapSlots.avaible .box-extra-slot .wrap-cta .cta{
|
||||
background-color: #55BC62;
|
||||
}
|
||||
.wrap-extra-slots{
|
||||
display: none;
|
||||
}
|
||||
.wrap-extra-slots .title-extraSlot-blocked{
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
margin: 0 0 10px;
|
||||
display: none;
|
||||
text-align: center;
|
||||
}
|
||||
.wrap-extra-slots .title-extraSlot-blocked img{
|
||||
width: 18px;
|
||||
margin-top: -5px;
|
||||
}
|
||||
#auctionBidsModal #bidsBonusSection .img-lock, #auctionBidsModal #bidsBonusSection .img-lock-open{
|
||||
display: none;
|
||||
|
||||
}
|
||||
#auctionBidsModal #bidsBonusSection .img-lock img, #auctionBidsModal #bidsBonusSection .img-lock-open img{
|
||||
margin-left: 5px;
|
||||
width: 14px;
|
||||
margin-top: -5px;
|
||||
}
|
||||
#auctionBidsModal #differenzaAsteDaConfermare{
|
||||
color: #fff;
|
||||
background-color: #FF0658;
|
||||
border-radius: 40px;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
padding: 1px 2px;
|
||||
display: inline-block;
|
||||
font-size: 15px;
|
||||
}
|
||||
#auctionBidsModal #bonusEarned img{
|
||||
width: 15px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#auctionBidsModal .wrap-already-taken, #auctionBidsModal .bonus-yet-to-be-obtained{
|
||||
display: none;
|
||||
}
|
||||
#auctionBidsModal .wrap-already-taken .txt-already-taken{
|
||||
color: #797979;
|
||||
}
|
||||
#auctionBidsModal .bonus-yet-to-be-obtained{
|
||||
color: #FF0658;
|
||||
}
|
||||
#auctionBidsModal #bonusEarned .wrap-details-bonus{
|
||||
text-align: center;
|
||||
margin: 7px 0;
|
||||
}
|
||||
#auctionBidsModal #modalConfirmSlotStopGame{
|
||||
z-index: 11;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
height: 130px;
|
||||
background-color: #fff;
|
||||
width: 270px;
|
||||
margin: auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 15px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
#auctionBidsModal #modalConfirmSlotStopGame .contentButton .btn{
|
||||
padding: 2px 13px;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
margin: 3px;
|
||||
}
|
||||
#auctionBidsModal #modalConfirmSlotStopGame .contentButton .btn-confirm{
|
||||
background-color: #55BC62
|
||||
}
|
||||
#auctionBidsModal #modalConfirmSlotStopGame .contentButton .btn-cancel{
|
||||
background-color: #BFBFBF;
|
||||
}
|
||||
#auctionBidsModal #modalConfirmSlotStopGame .contentButton{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
#auctionBidsModal #modalConfirmSlotStopGame .content{
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
#auctionBidsModal #modalConfirmSlotStopGame .title{
|
||||
color: #FF0202;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#auctionBidsModal .overlayModalConfirmSlotStopGame{
|
||||
background: rgba(0,0,0,0.2);
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
$(document).ready(function () {
|
||||
window.myAuctionsControlDetail = new Array(); // array di oggetti deputato a contenere l'asta dove si sta autopuntando
|
||||
window.myAuctionsControlDetail_lock = false; // flag to lock SetInterval execution
|
||||
|
||||
/*
|
||||
*
|
||||
* @returns {undefined}
|
||||
* questa funzione si occupa di controllare ogni 2 secondi se l'asta (dettaglio) su cui c'è un'autopuntata sia realmente attive o c'è stato un blocco lato UI
|
||||
*
|
||||
*/
|
||||
|
||||
setInterval(
|
||||
function () {
|
||||
|
||||
if (window.myAuctionsControlDetail_lock == false) {
|
||||
|
||||
window.myAuctionsControlDetail_lock = true; // lock setinterval execution
|
||||
|
||||
//console.log("--- Checking autobids..."); // FOR DEBUG
|
||||
let isAuctionStarted_element = $(".auction-action-timer.auction-header-item-size.closed-timer"); // element not present if auction started
|
||||
|
||||
let callingAjax = false;
|
||||
if (isAuctionStarted_element.length == 0) { // check element not present if auction started
|
||||
|
||||
let element_value = $('.auction-autobid-current-value'); // recupero il valore delle puntate rimanenti nell'asta
|
||||
|
||||
if (element_value.length > 0) {
|
||||
let value = $(element_value[0]).text(); // recupero il valore delle puntate rimanenti nell'asta
|
||||
//console.log("Puntate autobid = "+value); // FOR DEBUG
|
||||
|
||||
if (value > 0) {
|
||||
let idasta = $('input.js-switch.autobid-switch').data("id"); // recupero l'id dell'asta
|
||||
//console.log("Checking Asta: " + idasta); // FOR DEBUG
|
||||
let timestamp = Date.now();
|
||||
|
||||
let myAuctions = {
|
||||
idasta: idasta,
|
||||
value: value,
|
||||
timestamp: timestamp,
|
||||
element_value: element_value
|
||||
}
|
||||
|
||||
if (window.myAuctionsControlDetail.length == 0) { // controllo che questa asta non sia già nell'array
|
||||
//console.log("Adding Asta in array."); // FOR DEBUG
|
||||
window.myAuctionsControlDetail = myAuctions;
|
||||
} else {
|
||||
if (window.myAuctionsControlDetail.value != value) { // controllo che il valore sia cambiato per in modo da aggiornare le informazioni
|
||||
//console.log("Value changed."); // FOR DEBUG
|
||||
window.myAuctionsControlDetail = myAuctions;
|
||||
} else {
|
||||
//console.log("Checking time..."); // FOR DEBUG
|
||||
// in questa condizione il valore non è cambiato dunque controllerò da quanto tempo non cambia
|
||||
var diffMs = (Date.now() - window.myAuctionsControlDetail.timestamp);
|
||||
//console.log("diffMs = "+diffMs); // FOR DEBUG
|
||||
//var diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
|
||||
var diffSecs = Math.round(((diffMs % 86400000) % 3600000) / 1000); // minutes
|
||||
//console.log("diffSecs = "+diffSecs); // FOR DEBUG
|
||||
|
||||
// nel caso in cui la differenza è maggiore o uguale a 2 minuti invoco la funzione che si occuperà di spedire le informazioni lato backend
|
||||
if (diffSecs >= 70) { // default 70 secs
|
||||
callingAjax = true;
|
||||
sentToVerification(myAuctions);
|
||||
window.myAuctionsControlDetail = new Array(); // elimino l'asta dall'array
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
window.myAuctionsControlDetail = new Array(); // elimino l'asta dall'array
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (callingAjax === false) {
|
||||
window.myAuctionsControlDetail_lock = false; // unlock setinterval execution
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
2000);
|
||||
|
||||
|
||||
function sentToVerification(myAuctions) {
|
||||
|
||||
// funzione che serve ad inviare al backend l'asta attiva ma con valori di autopuntata fermi da 2 min
|
||||
//console.log(myAuctions); // FOR DEBUG
|
||||
|
||||
$.ajax({
|
||||
url: "check_autobid.php",
|
||||
//dataType: json,
|
||||
method: 'POST',
|
||||
timeout: 10000, // default 10000
|
||||
data : {
|
||||
idasta: myAuctions.idasta,
|
||||
value: myAuctions.value,
|
||||
timestamp: myAuctions.timestamp
|
||||
},
|
||||
}).done(function (response) {
|
||||
window.myAuctionsControlDetail_lock = false; // unlock setinterval execution
|
||||
//console.log("response = " + response); // FOR DEBUG
|
||||
$(myAuctions.element_value).text(response);
|
||||
}).fail(function(jqXHR, textStatus){
|
||||
if(textStatus === 'timeout') {
|
||||
//console.log("Ajax timeout. Recall ajax."); // FOR DEBUG
|
||||
sentToVerification(myAuctions);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,322 @@
|
||||
function getTexts() {
|
||||
"use strict"
|
||||
return {
|
||||
dialog_confirm: "Sei sicuro di voler rimuovere l\'AutoPuntata?",
|
||||
autobid_active: "Hai attivato la funzione utilizzando le puntate prenotate",
|
||||
autobid_not_active: "Attiva la funzione utilizzando le puntate prenotate",
|
||||
autobid_add: "AGGIUNGI",
|
||||
autobid_insert: "INSERISCI"
|
||||
};
|
||||
}
|
||||
|
||||
function enableAutobid() {
|
||||
"use strict";
|
||||
|
||||
$(".auction-action-autobid-trigger")
|
||||
.toggleClass("button-fucsia-flat", true)
|
||||
.toggleClass("button-gray-flat", false)
|
||||
.off('click')
|
||||
.on('click', setAutobid);
|
||||
|
||||
$(".auction-action-autobid-input")
|
||||
.attr('disabled', false)
|
||||
.off("keyup").keyup(function (e) {
|
||||
if (13 == e.which)
|
||||
$(".auction-action-autobid-trigger").click();
|
||||
$(".auction-action-autobid-mobile .auction-action-autobid-trigger").toggleClass("disable", $(this).val().length == 0);
|
||||
});
|
||||
}
|
||||
|
||||
function disableAutobid(reason) {
|
||||
"use strict";
|
||||
|
||||
$(".auction-action-autobid-trigger")
|
||||
.off('click')
|
||||
.on('click', function () {
|
||||
if (!reason)
|
||||
return;
|
||||
showErrorTooltip('.auction-action-autobid-trigger:eq(' + getAuctionSelector() + ')', {
|
||||
title: reason,
|
||||
html: true,
|
||||
container: "body",
|
||||
trigger: "manual",
|
||||
placement: "top",
|
||||
template: getTemplateTooltip("error")
|
||||
}, 3000);
|
||||
});
|
||||
}
|
||||
|
||||
function unsetAutobid(evt) {
|
||||
"use strict";
|
||||
if ('undefined' == typeof window['autobid_switchery']) {
|
||||
return;
|
||||
}
|
||||
if (!isSwitchEnabled()) {
|
||||
if (evt) {
|
||||
window._autoController.setAutobid('delete', null, cleanUpAutobidSwitch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function cleanUpAutobidSwitch() {
|
||||
"use strict"
|
||||
$(".auction-autobid-button")
|
||||
.toggleClass("active", false)
|
||||
.find(".bi-autobid")
|
||||
.toggleClass("bi-dark", true)
|
||||
.toggleClass("bi-green", false);
|
||||
$(".auction-action-bid-mobile .auction-autobid-current-value").empty();
|
||||
setTimeout(function () {
|
||||
if (!isSmartphoneDevice())
|
||||
$('.auction-action-autobid-trigger').text(getTexts().autobid_insert);
|
||||
}, 400);
|
||||
updateAutobid(0);
|
||||
$('.auction-action-autobid:not(.auction-seat-autobid) .autobid-switch-container, .auction-action-autobid-mobile .autobid-switch-container').hide();
|
||||
}
|
||||
|
||||
function isSwitchEnabled() {
|
||||
return 'undefined' != typeof window['autobid_switchery'] && window.autobid_switchery[isSmartphoneDevice() ? 1 : 0].isChecked();
|
||||
}
|
||||
|
||||
function hideAutobid() {
|
||||
"use strict";
|
||||
$(".auction-action-autobid:visible").hide();
|
||||
}
|
||||
|
||||
function showLoginAutobid() {
|
||||
"use strict";
|
||||
$(".auction-action-autobid-trigger")
|
||||
.off('click')
|
||||
.on('click', window.parent.showLogin);
|
||||
|
||||
$(".auction-action-autobid-input").attr('disabled', true);
|
||||
}
|
||||
|
||||
function bindAutobidTrigger() {
|
||||
"use strict";
|
||||
var sNickLoggato = $("#NickLoggato").length > 0 ? $("#NickLoggato").val() : "";
|
||||
|
||||
if (sNickLoggato.length <= 0) {
|
||||
return showLoginAutobid();
|
||||
}
|
||||
$('.auction-action-autobid-trigger').off('click').on('click', function (evt) {
|
||||
var triggerElement = $(this);
|
||||
rippleButton(triggerElement, evt);
|
||||
|
||||
var autobidInputElement = $(".auction-action-autobid-input").eq(isSmartphoneDevice() ? 1 : 0);
|
||||
|
||||
var inputAmount = parseInt(autobidInputElement.val(), 10);
|
||||
var dataInputAmount = parseInt(autobidInputElement.data("amount"), 10);
|
||||
var autobidAmount = !isNaN(dataInputAmount) ? dataInputAmount : inputAmount;
|
||||
autobidInputElement.removeData("amount");
|
||||
|
||||
var autobidLoader = $(".auction-autobid-loader-container");
|
||||
var switchContainer = $('.autobid-switch-container');
|
||||
|
||||
triggerElement.removeAttr("data-autobid-button");
|
||||
|
||||
var isNotValidAmount = isNaN(inputAmount) && isNaN(dataInputAmount);
|
||||
if (isNotValidAmount) {
|
||||
if (isSmartphoneDevice() && !$("[data-stage='2']").is(":visible"))
|
||||
return $(".auction-action-autobid-mobile .auction-action-autobid-input").trigger("focus");
|
||||
} else {
|
||||
autobidLoader.removeClass("hidden");
|
||||
switchContainer.hide();
|
||||
}
|
||||
|
||||
cleanAutobidRequest();
|
||||
window._autoController.setAutobid('create', autobidAmount, function () {
|
||||
switchContainer.show();
|
||||
if (true == isSwitchEnabled())
|
||||
return;
|
||||
$(".autobid-switch.js-switch:hidden")
|
||||
.eq(isSmartphoneDevice() ? 1 : 0)
|
||||
.data("autobid-enabled", "true")
|
||||
.trigger('click');
|
||||
$(".auction-autobid-button")
|
||||
.toggleClass("active", true)
|
||||
.find(".bi-autobid")
|
||||
.toggleClass("bi-dark", false)
|
||||
.toggleClass("bi-green", true);
|
||||
|
||||
var id_product = getUrlParam("a").split("_").reverse()[0];
|
||||
$("#DA"+id_product).find('.favorite').attr('title', "Non puoi rimuoverla dai preferiti se è attiva l\'autopuntata");
|
||||
$("#DA"+id_product).find('.favorite').attr('data-original-title', "Non puoi rimuoverla dai preferiti se è attiva l\'autopuntata");
|
||||
$("#DA"+id_product).find('.favorite').attr('disabled', 'disabled');
|
||||
$("#DA"+id_product).find('.favorite').addClass('active');
|
||||
if (isDeepModal()) {
|
||||
window.parent.BidooCnf.instances.auction.features.startAutobidAuctionUpdate();
|
||||
}
|
||||
|
||||
if (isSmartphoneDevice())
|
||||
return;
|
||||
|
||||
setTimeout(function () {
|
||||
$('.auction-action-autobid-trigger').text(getTexts().autobid_add);
|
||||
}, 400);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setAutobid() {
|
||||
"use strict";
|
||||
if ('undefined' == typeof window['autobid_switchery']) {
|
||||
return;
|
||||
}
|
||||
bindAutobidTrigger();
|
||||
$('.auction-action-autobid-trigger').not("[data-autobid-button]").trigger('click');
|
||||
}
|
||||
|
||||
function updateAutobid(value) {
|
||||
"use strict";
|
||||
var element = $(".auction-autobid-current-value");
|
||||
var oldValue = parseInt(element.eq(0).text(), 10);
|
||||
|
||||
if (value != oldValue) {
|
||||
element.toggle(value > 0);
|
||||
element.text(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function cleanAutobidRequest() {
|
||||
"use strict";
|
||||
$(".auction-action-autobid-input").val('');
|
||||
window._autoController.stopTicker();
|
||||
}
|
||||
|
||||
function updateAutobidStatus(status, value) {
|
||||
"use strict";
|
||||
switch (status) {
|
||||
case 'set':
|
||||
case 'create':
|
||||
{
|
||||
if (0 == value) {
|
||||
closeSwitch();
|
||||
} else {
|
||||
updateAutobid(value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'unset':
|
||||
{
|
||||
closeSwitch();
|
||||
unsetAutobid(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
function closeSwitch() {
|
||||
$('.js-switch.autobid-switch')
|
||||
.eq(isSmartphoneDevice() ? 1 : 0)
|
||||
.data("autobid-enabled", "false")
|
||||
.trigger("click");
|
||||
}
|
||||
function setAutobidUI(isAutobid) {
|
||||
"use strict"
|
||||
$(".auction-action-autobid-mobile .autobid-switch-container").toggle(isAutobid);
|
||||
$(".auction-action-bid-mobile .auction-autobid-button")
|
||||
.toggleClass("active", isAutobid)
|
||||
.find(".bi-autobid")
|
||||
.toggleClass("bi-dark", !isAutobid)
|
||||
.toggleClass("bi-green", isAutobid);
|
||||
$(".js-switch.autobid-switch")
|
||||
.data("autobid-enabled", "false")
|
||||
.trigger('click');
|
||||
}
|
||||
|
||||
function setCorrectPlaceholder(isFocused) {
|
||||
"use strict"
|
||||
this.attr("placeholder", isFocused ? "" : $(this).data("placeholder"));
|
||||
$(".auction-action-autobid-mobile .auction-action-autobid-trigger").toggleClass("disable", this.val().length == 0);
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
"use strict";
|
||||
window.autobid_switchery = [];
|
||||
window.autobid_seat_switchery = [];
|
||||
$(".js-switch.autobid-switch").each(function (k, item) {
|
||||
window.autobid_switchery.push(new Switchery(item, {size: 'small'}));
|
||||
});
|
||||
|
||||
$(".js-switch.autobid-seat-switch").each(function (k, item) {
|
||||
window.autobid_seat_switchery.push(new Switchery(item, {size: 'small'}));
|
||||
});
|
||||
|
||||
$('.js-switch.autobid-seat-switch').off('change').on('change', function () {
|
||||
var self = this;
|
||||
var isEnabled = $(this).is(':checked');
|
||||
if (isEnabled) {
|
||||
window.stage.getUpdate(function (update) {
|
||||
window._autoController.setAutobid('create', update.me.budget.total, function () {
|
||||
$(".autobid-seat-status").text(getTexts().autobid_active);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
window._autoController.setAutobid('delete', null, function () {
|
||||
updateAutobid(0);
|
||||
$(".autobid-seat-status").text(getTexts().autobid_not_active);
|
||||
});
|
||||
}
|
||||
if (isSmartphoneDevice())
|
||||
setAutobidUI(isEnabled);
|
||||
return true;
|
||||
});
|
||||
|
||||
function confirmAutobidUnset() {
|
||||
|
||||
if(confirm(getTexts().dialog_confirm)){
|
||||
|
||||
return true;
|
||||
}else{
|
||||
if (isSmartphoneDevice()){
|
||||
$('.switchery-small small').css('left', '30px');
|
||||
}else{
|
||||
$('#boxcontent .autobid-switch').click();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$('.js-switch.autobid-switch').off('change').on('change', function () {
|
||||
var switchAutobid = $(this);
|
||||
if (isSmartphoneDevice() && $("[data-stage='2']").is(":visible"))
|
||||
return true;
|
||||
var id_product = getUrlParam("a").split("_").reverse()[0];
|
||||
if (!switchAutobid.is(':checked') && ("false" == switchAutobid.data("autobid-enabled") || confirmAutobidUnset())) {
|
||||
unsetAutobid({});
|
||||
|
||||
|
||||
$("#DA"+id_product).find('.favorite').removeAttr('disabled');
|
||||
$("#DA"+id_product).find('.favorite').attr('title', "Rimuovi quest\'asta dalle tue preferite");
|
||||
if (isDeepModal()) {
|
||||
$("#DA"+id_product).find('.favorite').removeAttr('data-original-title');
|
||||
window.parent.BidooCnf.instances.auction.features.stopAutobidAuctionUpdate();
|
||||
setTimeout(function () {
|
||||
$("#divAsta"+id_product, parent.document).find('.favorite').removeAttr('data-original-title');
|
||||
$("#divAsta"+id_product, parent.document).find('.favorite').removeAttr('disabled');
|
||||
$("#divAsta"+id_product, parent.document).find('.favorite').attr('title', "Rimuovi quest\'asta dalle tue preferite");
|
||||
}, 500);
|
||||
} else {
|
||||
$("#DA"+id_product).find('.favorite').attr("data-original-title", "Rimuovi quest\'asta dalle tue preferite");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
$(".autobid-speed-dial > div > a").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var self = $(this);
|
||||
var amount = parseInt(self.attr("data-amount"));
|
||||
$(".auction-action-autobid-input").data("amount", amount);
|
||||
$('.auction-action-autobid-trigger').attr("data-autobid-button", true).trigger('click');
|
||||
});
|
||||
|
||||
var scopeElement = $(".auction-action-autobid-input[data-placeholder]");
|
||||
scopeElement
|
||||
.focus(setCorrectPlaceholder.bind(scopeElement, true))
|
||||
.blur(setCorrectPlaceholder.bind(scopeElement, false));
|
||||
});
|
||||
|
After Width: | Height: | Size: 35 KiB |
@@ -0,0 +1 @@
|
||||
!function(){var e={343:function(e){"use strict";for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,i=t;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},944:function(e){"use strict";var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},508:function(e,t,n){"use strict";var r=n(944),i=n(343);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var c=0;c<16;++c)t[o+c]=a[c];return t||i(a)}},168:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};t.__esModule=!0;var i=n(699),o=n(752),a=n(104),c=n(508);!function(){function e(e){var t="";if(t=window.location.origin?window.location.origin:"".concat(window.location.protocol,"://").concat(window.location.host),e&&"string"==typeof e)if(0===e.indexOf("/"))t+=e;else try{var n=new URL(e);return"".concat(n.protocol,"://").concat(n.host).concat(n.pathname)}catch(e){}else{var r=window.location.pathname;r&&r.length>0&&(t+=r)}return t}function t(e,t){for(var n in e){var r=e[n];void 0!==t&&("number"!=typeof r&&"string"!=typeof r||(t[n]=r))}}!function(){var n,u,s=window.performance||window.webkitPerformance||window.msPerformance||window.mozPerformance,f="data-cf-beacon",d=document.currentScript||("function"==typeof document.querySelector?document.querySelector("script[".concat(f,"]")):void 0),l=c(),v=[],p=window.__cfBeacon?window.__cfBeacon:{};if(!p||"single"!==p.load){if(d){var m=d.getAttribute(f);if(m)try{p=r(r({},p),JSON.parse(m))}catch(e){}else{var g=d.getAttribute("src");if(g&&"function"==typeof URLSearchParams){var y=new URLSearchParams(g.replace(/^[^\?]+\??/,"")),h=y.get("token");h&&(p.token=h);var T=y.get("spa");p.spa=null===T||"true"===T}}p&&"multi"!==p.load&&(p.load="single"),window.__cfBeacon=p}if(s&&p&&p.token){var w,S,b=!1;document.addEventListener("visibilitychange",(function(){if("hidden"===document.visibilityState){if(L&&A()){var t=e();(null==w?void 0:w.url)==t&&(null==w?void 0:w.triggered)||P(),_(t)}!b&&w&&(b=!0,B())}else"visible"===document.visibilityState&&(new Date).getTime()}));var E={};"function"==typeof PerformanceObserver&&((0,a.onLCP)(x),(0,a.onFID)(x),(0,a.onFCP)(x),(0,a.onINP)(x),(0,a.onTTFB)(x),PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("layout-shift")&&(0,a.onCLS)(x));var L=p&&(void 0===p.spa||!0===p.spa),C=p.send&&p.send.to?p.send.to:void 0===p.version?"https://cloudflareinsights.com/cdn-cgi/rum":null,P=function(r){var a=function(r){var o,a,c=s.timing,u=s.memory,f=r||e(),d={memory:{},timings:{},resources:[],referrer:(o=document.referrer||"",a=v[v.length-1],L&&w&&a?a.url:o),eventType:i.EventType.Load,firstPaint:0,firstContentfulPaint:0,startTime:F(),versions:{fl:p?p.version:"",js:"2024.6.1",timings:1},pageloadId:l,location:f,nt:S,serverTimings:I()};if(null==n){if("function"==typeof s.getEntriesByType){var m=s.getEntriesByType("navigation");m&&Array.isArray(m)&&m.length>0&&(d.timingsV2={},d.versions.timings=2,d.dt=m[0].deliveryType,delete d.timings,t(m[0],d.timingsV2))}1===d.versions.timings&&t(c,d.timings),t(u,d.memory)}else O(d);return d.firstPaint=k("first-paint"),d.firstContentfulPaint=k("first-contentful-paint"),p&&(p.icTag&&(d.icTag=p.icTag),d.siteToken=p.token),void 0!==n&&(delete d.timings,delete d.memory),d}(r);a&&p&&(a.resources=[],p&&((0,o.sendObjectBeacon)("",a,(function(){}),!1,C),void 0!==p.forward&&void 0!==p.forward.url&&(0,o.sendObjectBeacon)("",a,(function(){}),!1,p.forward.url)))},B=function(){var t=function(){var t=s.getEntriesByType("navigation")[0],n="";try{n="function"==typeof s.getEntriesByType?new URL(null==t?void 0:t.name).pathname:u?new URL(u).pathname:window.location.pathname}catch(e){}var r={referrer:document.referrer||"",eventType:i.EventType.WebVitalsV2,versions:{js:"2024.6.1"},pageloadId:l,location:e(),landingPath:n,startTime:F(),nt:S,serverTimings:I()};return p&&(p.version&&(r.versions.fl=p.version),p.icTag&&(r.icTag=p.icTag),r.siteToken=p.token),E&&["lcp","fid","cls","fcp","ttfb","inp"].forEach((function(e){r[e]={value:-1,path:void 0},E[e]&&void 0!==E[e].value&&(r[e]=E[e])})),O(r),r}();p&&(0,o.sendObjectBeacon)("",t,(function(){}),!0,C)},R=function(){var t=window.__cfRl&&window.__cfLine truncated
|
||||
@@ -0,0 +1,255 @@
|
||||
.btn-promo, .btn-promo:hover {
|
||||
background: #2196f3 !important;
|
||||
}
|
||||
|
||||
.mCSB_inside > .mCSB_container {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerRail {
|
||||
width: 6px;
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_draggerContainer {
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
|
||||
background-color: #20cb9a !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#toggleBar {
|
||||
margin-left: 0 !important;
|
||||
left: 20px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.barra {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.btn-promo {
|
||||
margin-top: -2px;
|
||||
line-height: 17.5px;
|
||||
}
|
||||
|
||||
.view_gray_link {
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.leader-btn {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
text-transform: uppercase;
|
||||
font-size: 10px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.bid_chal img.img-lock{
|
||||
display: none;
|
||||
}
|
||||
.bid_chal img{
|
||||
margin-top: -3px;
|
||||
}
|
||||
.wrap-limit-unlock{
|
||||
color: #fff;
|
||||
background-color: #55bc62;
|
||||
border-radius: 5px;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
text-transform: initial;
|
||||
width: 120px;
|
||||
margin: -4px auto 0;
|
||||
}
|
||||
|
||||
.wrap-button-get-bonus{
|
||||
color: #000;
|
||||
background-color: #FFC642;
|
||||
border-radius: 5px;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
display: none;
|
||||
text-transform: initial;
|
||||
margin-top: -4px;
|
||||
}
|
||||
.wrap-button-get-bonus img{
|
||||
width: 14px;
|
||||
}
|
||||
.bid_chal {
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
text-transform: none;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.next-level {
|
||||
background-color: #eaeaea;
|
||||
margin: 0;
|
||||
width: 124px;
|
||||
height: 8px;
|
||||
box-shadow: none;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#tickNotif {
|
||||
background: white;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
transform: rotate(-45deg);
|
||||
border: 1px solid #e2e2e2;
|
||||
position: fixed;
|
||||
margin-top: -15px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.notifIcon {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
#boxarea.dodici {
|
||||
width: 920px;
|
||||
}
|
||||
|
||||
#tickNotif {
|
||||
margin-left: 17px;
|
||||
}
|
||||
|
||||
.small_notif {
|
||||
margin-left: 119px !important;
|
||||
}
|
||||
|
||||
.bonus_dialog {
|
||||
left: 48.5%;
|
||||
}
|
||||
|
||||
.leader_btn {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.tooltip.reach > .tooltip-inner .wrap{
|
||||
display: flex;
|
||||
}
|
||||
.tooltip.reach > .tooltip-inner .wrap img{
|
||||
width: 16px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.tooltip.reach > .tooltip-inner {
|
||||
background-color: #fff;
|
||||
border: 1px solid #333;
|
||||
color: #232323;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.tooltip.reach > .tooltip-inner > span {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tooltip.reach > .tooltip-inner > span:last-child {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.tooltip.reach > .tooltip-inner strong {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.bid-challenge > strong {
|
||||
color: darkorange;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tooltip.reach > .tooltip-inner {
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.leader-btn:hover, .leader-btn {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.paid-all {
|
||||
color: #565454;
|
||||
margin-top: -5px;
|
||||
text-transform: initial;
|
||||
}
|
||||
.active-all {
|
||||
color: #55bc62;
|
||||
margin-top: -5px;
|
||||
text-transform: initial;
|
||||
}
|
||||
.paid-all img, .active-all img{
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.bar-right-side .pull-right{
|
||||
margin-right: -30px;
|
||||
}
|
||||
|
||||
.bar-right-side .pull-right > *,
|
||||
.bar-left-side > *{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.bar-left-side{
|
||||
margin-top: 5px;
|
||||
}
|
||||
.auctions_won_bottom_bar { /*[GR]*/
|
||||
border: 2px solid #ffc518 !important;
|
||||
background-color:#fff;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border-radius: 5px;
|
||||
padding: 5px 10px;
|
||||
color:#3d3a3a;
|
||||
outline: 0;
|
||||
font-weight:bold;
|
||||
height:29px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.auctions_won_bottom_bar:hover{ /*[GR]*/
|
||||
background-color: #ffc518 !important;
|
||||
color: #fff;
|
||||
}
|
||||
.auctions_won_bottom_bar .badge { /*[GR]*/
|
||||
background-color: #ff2f4e;
|
||||
left: 20px;
|
||||
top: -12px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
.barra[data-lang="es"] #ba #boxarea .notifIcon{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.barra[data-lang="es"] #ba #boxarea #lim{
|
||||
margin-left: 5px;
|
||||
|
||||
}
|
||||
.barra[data-lang="es"] #ba #boxarea .auctions_won_bottom_bar{
|
||||
margin-left: 5px;
|
||||
margin-top: 1px;
|
||||
|
||||
}
|
||||
@media(max-width: 1200px){
|
||||
.barra[data-lang="es"] #ba #boxarea .auctions_won_bottom_bar, .barra[data-lang="es"] #ba #boxarea #lim{
|
||||
width: 110px;
|
||||
font-size: 11px;
|
||||
padding: 5px;
|
||||
}
|
||||
.barra[data-lang="es"] .notif{
|
||||
margin: -5px 6px !important;
|
||||
}
|
||||
}
|
||||
.bidooBell{
|
||||
color: #c3c0c1;
|
||||
font-size: 21px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.bidooBell:hover, .bidooBell:active, .bidooBell:focus, .bidooBell.active{
|
||||
color: #666666;
|
||||
transition: color 0.4s;
|
||||
}
|
||||
#auctionBidBottomBar{
|
||||
outline: none !important;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
function BottomBar(){
|
||||
"use strict"
|
||||
var self = this;
|
||||
self.footer = $(".footer");
|
||||
self.checkFooter();
|
||||
}
|
||||
|
||||
BottomBar.prototype.checkFooter = function() {
|
||||
"use strict"
|
||||
var self = this;
|
||||
if (!self.footer.length) return;
|
||||
$(window).scroll(function() {
|
||||
$(".goTop").find("i")
|
||||
.toggleClass("white_top_arrow", isElementInView(self.footer, false));
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
"use strict"
|
||||
new BottomBar();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 111.04 111.07"><g data-name="Layer 2"><g data-name="Livello 1"><path d="M99.57 55.93v2.37c0 13.28-22.29 24-49.78 24-15.18.03-28.79-3.3-37.9-8.42 3.08 12 24 21.86 49.38 21.86C88.76 95.73 111 84.11 111 70.85c0-5.84-4.32-11-11.48-14.92" fill="#fcc62d"/><path d="M61.27 95.73c-27.5 0-49.78-11.62-49.78-24.89V87c0 13.27 22.29 24 49.78 24S111 100.29 111 87V70.85c0 13.27-22.29 24.89-49.77 24.89" fill="#e4af18"/><path d="M17.23 98.31a31.46 31.46 0 0 0 3.83 3V85.4a31.73 31.73 0 0 1-3.83-3.08zm0 0M101.47 85.4v15.87a30.53 30.53 0 0 0 3.83-3v-16a31.73 31.73 0 0 1-3.83 3.08M24.89 103.5q1.82.94 3.83 1.79V89.6c-1.34-.59-2.62-1.22-3.83-1.87zm0 0M93.82 105.29c1.35-.56 2.62-1.16 3.83-1.79V87.73a56.83 56.83 0 0 1-3.83 1.87zm0 0M32.55 106.74c1.23.42 2.51.81 3.82 1.18V92.39c-1.31-.39-2.59-.81-3.82-1.26zm0 0M86.16 107.91c1.32-.36 2.59-.76 3.83-1.18v-15.6c-1.24.45-2.52.87-3.83 1.26zm0 0M42.13 109.3c1.24.25 2.52.48 3.82.68V94.57c-1.3-.22-2.58-.46-3.82-.73zm0 0M76.59 110c1.3-.21 2.58-.43 3.83-.68V93.84q-1.88.41-3.83.73zm0 0M53.61 110.86c1.26.09 2.54.16 3.83.21V95.74a95.01 95.01 0 0 1-3.83-.22zm0 0M65.1 111.07c1.29 0 2.57-.11 3.83-.21V95.52c-1.26.1-2.54.17-3.83.22zm0 0" fill="#ce9912"/><path d="M49.78 67C22.29 67 0 55.38 0 42.11v16.17c0 13.28 22.29 24 49.78 24s49.78-10.76 49.78-24V42.11C99.57 55.38 77.28 67 49.78 67" fill="#e4af18"/><path d="M5.74 69.59a31.41 31.41 0 0 0 3.83 3V56.66a31.68 31.68 0 0 1-3.83-3.06zm0 0M90 56.66v15.88a32 32 0 0 0 3.82-3v-16A31 31 0 0 1 90 56.66M13.41 74.77c1.2.62 2.49 1.21 3.82 1.78V60.86c-1.34-.59-2.62-1.21-3.82-1.86zm0 0M82.33 76.55c1.34-.55 2.67-1.15 3.83-1.78V59q-1.81 1-3.83 1.86zm0 0M21.06 78c1.23.42 2.52.82 3.82 1.19V63.65c-1.31-.39-2.59-.8-3.82-1.25zm0 0M74.67 79.19c1.32-.36 2.59-.77 3.83-1.19V62.4c-1.24.45-2.52.86-3.83 1.25zm0 0M30.64 80.56c1.25.25 2.52.49 3.82.68v-15.4c-1.3-.22-2.57-.46-3.82-.73zm0 0M65.1 81.24c1.3-.2 2.58-.43 3.83-.67V65.11q-1.88.41-3.83.73zm0 0M42.13 82.12c1.25.1 2.53.16 3.82.21V67c-1.29 0-2.57-.11-3.82-.21zm0 0M53.61 82.33c1.29 0 2.57-.1 3.83-.21V66.79c-1.26.09-2.54.17-3.83.21zm0 0" fill="#ce9912"/><path d="M98.26 63.76C93.12 74.4 73.38 82.33 49.78 82.33a93.67 93.67 0 0 1-24.27-3C32.46 84 44.82 88 61.27 88c26.19 0 42.12-10.17 42.12-17.16 0-2.34-1.79-4.82-5.13-7.09M59.36 63.18c-27.5 0-49.78-10.76-49.78-24V28.33C3.56 32.1 0 36.83 0 42.13 0 55.39 22.29 67 49.78 67 63 67 75 64.31 84 60a93.43 93.43 0 0 1-24.6 3.14" fill="#ffd949"/><path d="M59.36 47.86C31.86 47.86 9.57 36.24 9.57 23v16.14c0 13.28 22.29 24 49.78 24s49.78-10.76 49.78-24V23c0 13.28-22.29 24.9-49.78 24.9" fill="#e4af18"/><path d="M15.31 50.44a31.4 31.4 0 0 0 3.83 3V37.52a31.68 31.68 0 0 1-3.83-3.07zm0 0M99.57 37.52v15.87a32 32 0 0 0 3.82-3v-16a31 31 0 0 1-3.82 3.07M23 55.63c1.2.62 2.49 1.21 3.82 1.78V41.72c-1.34-.59-2.62-1.21-3.82-1.86zm0 0M91.9 57.4c1.35-.56 2.63-1.15 3.83-1.78V39.86q-1.81 1-3.83 1.86zm0 0M30.64 58.85c1.23.42 2.52.82 3.82 1.19V44.5c-1.31-.39-2.59-.8-3.82-1.25zm0 0M84.24 60c1.32-.36 2.59-.77 3.83-1.19V43.25c-1.24.45-2.52.86-3.83 1.25zm0 0M40.21 61.41c1.25.25 2.52.49 3.82.68V46.7c-1.3-.22-2.57-.46-3.82-.73zm0 0M74.67 62.1c1.3-.2 2.58-.43 3.83-.67V46q-1.88.41-3.83.73zm0 0M51.7 63c1.25.1 2.53.16 3.82.21V47.86c-1.29 0-2.57-.11-3.82-.21zm0 0M63.18 63.18c1.29 0 2.57-.1 3.83-.21V47.64c-1.26.09-2.54.17-3.83.21zm0 0" fill="#ce9912"/><path d="M109.14 23c0 13.27-22.29 24.89-49.78 24.89S9.57 36.25 9.57 23 31.86 0 59.36 0s49.78 9.7 49.78 23" fill="#fcc62d"/><path d="M59.36 40.15C33.16 40.15 17.23 30 17.23 23S33.16 5.74 59.36 5.74 101.47 16 101.47 23 85.55 40.15 59.36 40.15" fill="#ffd949"/><path d="M58.75 8.4a45.29 45.29 0 0 1 12.61 1.88A18.4 18.4 0 0 0 68.7 13l-.05.06a1.69 1.69 0 0 0-.25.32 36.43 36.43 0 0 0-9.4-1.26 29.39 29.39 0 0 0-7.54.81C39.92 15.38 40.2 21 40.3 21.84v.09l-.09-.16v-.08c-.71-1.44-3.62-8.87 8.7-12.1l.77-.19c.8-.2 1.61-.35 2.39-.48l.54-.09.59-.09.41-.05h.73l.57-.05c1.34-.2 2.62-.25 3.84-.24zM68 16.75a26.09 26.09 0 0 1 4 .25l3.46 3.77a19 19 0 0 1-2.15 1.56 4.63 4.63 0 0 1-.9.42 45.668 45.668 0 0 0-6.53-1.89 33.28 33.28 0 0 0-5.31-.68 7.42 7.42 0 0 0-3.83-2.08A47.31 47.31 0 0 1 68 16.75zM54.24 18.69c3.28 0 5.92 1.71 5.88 3.78 0 1.37-1.2 2.56-3 3.2a8.76 8.76 0 0 1-3.05.51 9.15 9.15 0 0 1-2.07-.24c-2.23-.55-3.8-1.92-3.77-3.52.01-2.07 2.71-3.74 6.01-3.73zM63 23.39l2.75 1.38 1.61.82.1.19v.33c0 .61-.66 1.15-1.64 1.29a3.34 3.34 0 0 1-.52 0 2.11 2.11 0 0 1-2-1c-.24-.58.2-1.18 1-1.48l-1.37-1a.28.28 0 0 1 0-.48zM58.83 28.24a8.18 8.18 0 0 0 2.85 1.85l.71.26a15.38 15.38 0 0 0 3.3.7l-.72.37c-.76-.07-1.46-.16-2-.27l-1.08-.21-.25-.07a9.32 9.32 0 0 1-2.16-.78 1.05 1.05 0 0 1-.63-.89z" fill="#e4af18"/><path d="M59.7 13.44a31.24 31.24 0 0 1 8.37 1.15 10 10 0 0 1 1.54 1.47h-1.29a46.67 46.67 0 0 0-13.57 1.8h-.5c-4.06 0-7.39 2-7.43 4.59A4 4 0 0 0 49 25.74a8.48 8.48 0 0 0 2 .88 8 8 0 0 1-2.82 4.81 15.37 15.37 0 0 1-6.53 3.05 9.31 9.31 0 0 0 3-2.87 6.12 6.12 0 0 0 1-3c.35-1.89-1.25-3.42-1.65-3.8a3 3 0 0 1-.49-.43l-.17-.19a4.15 4.15 0 0 1-.92-2.58 3.84 3.84 0 0 1 .33Line truncated
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
@@ -0,0 +1,14 @@
|
||||
/*!
|
||||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=9668a039dfb5b77dd335511d2b362a45)
|
||||
* Config saved to config.json and https://gist.github.com/9668a039dfb5b77dd335511d2b362a45
|
||||
*//*!
|
||||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,*:before,*:after{background:transparent !important;color:#000 !important;-webkit-box-shadow:none !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-downloadLine truncated
|
||||
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Bootstrap v3.2.0 (http://getbootstrap.com)
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.Line truncated
|
||||
@@ -0,0 +1,140 @@
|
||||
var BUYNOW_COUNTDOWN = null;
|
||||
var BUYNOW_ERRORS = {
|
||||
already_used: 'Hai usato l’opzione Compralo in quest’asta',
|
||||
already_won: 'Hai vinto questa Asta.<br>Non puoi usare l’opzione Compralo'
|
||||
};
|
||||
window.serverTime = () => {
|
||||
//vado a prendere il valore dalla pagina, precedentemente messo in php
|
||||
if($('.buynow-countdown-container .product-buynow-countdown').hasClass('time-server')){
|
||||
return parseInt($('.time-server').attr('data-time-server')) != "NaN" ? parseInt($('.time-server').attr('data-time-server')) : null ;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function startBuynowCountdown(time) {
|
||||
"use strict";
|
||||
|
||||
var element = $(".product-buynow-countdown[data-countdown]");
|
||||
|
||||
if('active' == element.attr("data-countdown-status")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if('undefined' != typeof time) {
|
||||
element.attr('data-countdown', time);
|
||||
}
|
||||
|
||||
var countdown = element.attr('data-countdown');
|
||||
|
||||
if(countdown && countdown.length > 0) {
|
||||
BUYNOW_COUNTDOWN = setInterval(function() {
|
||||
var countdown_value = SimpleCountdown(countdown);
|
||||
element.text(countdown_value);
|
||||
|
||||
/*
|
||||
Destroy interval
|
||||
Hide countdown
|
||||
*/
|
||||
var timeServer = typeof window.serverTime() != null ? window.serverTime() : (new Date()).getTime() / 1000;
|
||||
|
||||
var isExpired = countdown <= parseInt(timeServer);
|
||||
$(".buyitnow-status p > span.product-value").toggle(isExpired);
|
||||
$("span.product-buynow-countdown").toggle(!isExpired);
|
||||
if(isExpired) clearInterval(BUYNOW_COUNTDOWN);
|
||||
}, 1000);
|
||||
element.attr("data-countdown-status", "active");
|
||||
}
|
||||
}
|
||||
|
||||
function setStatusBuynowButton(status, error_type) {
|
||||
"use strict";
|
||||
|
||||
var selector = ".buyitnow-button";
|
||||
var element = $(selector);
|
||||
var defaults = "button-default button-full buyitnow-button ripple-button";
|
||||
var base = "buyitnow-button";
|
||||
var specific = 'button-blue-gradient';
|
||||
|
||||
switch(status) {
|
||||
default:
|
||||
case 'enabled': {
|
||||
bindBuynowTrigger(error_type);
|
||||
break;
|
||||
}
|
||||
case 'engaged': {
|
||||
$('body').find("[data-buynow-state='engaged']").fadeIn();
|
||||
bindBuynowTrigger(error_type);
|
||||
break;
|
||||
}
|
||||
case 'disabled': {
|
||||
specific = "button-gray-flat";
|
||||
element.off('click');
|
||||
element.find("[data-buynow-state='engaged']").fadeOut('fast');
|
||||
break;
|
||||
}
|
||||
case 'login': {
|
||||
element.off('click').on('click', window.parent.showLogin);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if("undefined"===typeof element[0]) return element;
|
||||
var oldClass = element[0].className;
|
||||
var newClass = [defaults, specific, [base, status].join('-')].join(' ');
|
||||
|
||||
if(oldClass != newClass) {
|
||||
$("main.buyitnow").find(selector).each(function(k, item) {
|
||||
$(item).removeClass();
|
||||
$(item).addClass(newClass);
|
||||
});
|
||||
$(".auction-action-bid-mobile .buyitnow-button")
|
||||
.toggleClass(specific,true);
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
function bindBuynowTrigger(error_type) {
|
||||
"use strict";
|
||||
var selector = ".buyitnow-button";
|
||||
var element = $('body').find(selector);
|
||||
|
||||
element.each(function(k, elem) {
|
||||
$(elem).off('click').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
rippleButton($(elem), e);
|
||||
|
||||
if(!error_type) {
|
||||
var url = "buy_your_product.php"+parseURL(window.location.href).search;
|
||||
navigateDeepModalURL(url);
|
||||
return false;
|
||||
}
|
||||
|
||||
$(elem).popover({
|
||||
html: true,
|
||||
content: BUYNOW_ERRORS[error_type],
|
||||
placement: isSmartphoneDevice() ? "top" : "bottom",
|
||||
selector: selector,
|
||||
container: "body"
|
||||
}).on('shown.bs.popover', function() {
|
||||
setTimeout(function() {
|
||||
$(selector).popover('destroy');
|
||||
}, 3000);
|
||||
}).popover('show');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
"use strict";
|
||||
$("body").find(".expenditure-value").each(function(k, item) {
|
||||
var expenditure = $(item).text();
|
||||
if(expenditure.length && parseInt(expenditure, 10) > 0) {
|
||||
updateUserExpenditure(expenditure);
|
||||
$('[data-buynow-state="engaged"]').fadeIn();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22.99 23.21"><defs><style>.cls-1{fill:#fcc62d;}.cls-2{fill:#ffd949;}.cls-3{fill:#e4af18;}.cls-4{fill:#57868e;}</style></defs><title>Asset 9cart</title><g id="Layer_2" data-name="Layer 2"><g id="Livello_3" data-name="Livello 3"><circle class="cls-1" cx="11.5" cy="8.49" r="3.09"/><circle class="cls-2" cx="11.5" cy="8.49" r="2.32"/><path class="cls-3" d="M12.51,7.17a2.17,2.17,0,0,0-.19.32h0l0,0a1.66,1.66,0,0,0-1.25,0,1,1,0,0,0-.81,1.05h0v0h0a1.11,1.11,0,0,1,.63-1.42l.06,0L11.09,7h.21A2.17,2.17,0,0,1,12.51,7.17Z"/><path class="cls-3" d="M12.83,8.4a1.68,1.68,0,0,1-.16.18l-.06.05h0l-.22-.12-.26-.1a1.56,1.56,0,0,0-.39-.08.55.55,0,0,0-.28-.24A2,2,0,0,1,12.57,8Z"/><path class="cls-3" d="M11.26,8.16a.44.44,0,1,0,0,.88A.43.43,0,0,0,11.48,9a.44.44,0,0,0-.23-.82Z"/><path class="cls-3" d="M10.72,8.6a.54.54,0,0,1,.54-.54h0a2.38,2.38,0,0,1,1.09-.22,1.07,1.07,0,0,0-.12-.17,1.53,1.53,0,0,0-.86-.11h0a1.43,1.43,0,0,0-.46.15,1.14,1.14,0,0,0-.27.2.93.93,0,0,0-.22.34h0v0h0a.68.68,0,0,0,0,.17.67.67,0,0,0,.07.3v0h0l0,.05a.69.69,0,0,1,.13.45,1,1,0,0,1-.07.35,1,1,0,0,1-.22.34,1,1,0,0,0,.48-.36A1,1,0,0,0,11,9.33a1.52,1.52,0,0,0,0-.24.54.54,0,0,1-.31-.49Z"/><path class="cls-3" d="M12.25,9A.16.16,0,1,1,12,8.89l-.1-.11a0,0,0,0,1,0-.06h0l.2.16.12.09V9A.15.15,0,0,1,12.25,9Z"/><path class="cls-3" d="M12.18,9.61l0,0h-.07l-.15,0h0l-.08,0h0a.57.57,0,0,1-.16-.09.14.14,0,0,1,0-.1V9.28a.66.66,0,0,0,.21.22l.05,0a.79.79,0,0,0,.24.08Z"/><path class="cls-3" d="M12.55,8.74l0,0-.08,0,0,0-.23-.1a.73.73,0,0,1,0,1l-.05,0h0a.73.73,0,0,1-1-.14,1,1,0,0,1-.12.22,1,1,0,0,0,1.62-1Z"/><circle class="cls-1" cx="8.49" cy="8.14" r="3.09"/><circle class="cls-2" cx="8.49" cy="8.14" r="2.32"/><path class="cls-3" d="M9.51,6.82a2.17,2.17,0,0,0-.19.32h0l0,0A1.66,1.66,0,0,0,8,7.14a1,1,0,0,0-.81,1.05h0v0h0a1.11,1.11,0,0,1,.63-1.42l.06,0,.18-.06h.21A2.17,2.17,0,0,1,9.51,6.82Z"/><path class="cls-3" d="M9.82,8a1.68,1.68,0,0,1-.16.18l-.06.05h0l-.22-.12-.26-.1A1.56,1.56,0,0,0,8.72,8a.55.55,0,0,0-.28-.24,2,2,0,0,1,1.12-.14Z"/><path class="cls-3" d="M8.25,7.81a.44.44,0,1,0,0,.88.43.43,0,0,0,.23-.06.44.44,0,0,0-.23-.82Z"/><path class="cls-3" d="M7.71,8.25a.54.54,0,0,1,.54-.54h0A2.38,2.38,0,0,1,9.38,7.5a1.07,1.07,0,0,0-.12-.17,1.53,1.53,0,0,0-.86-.11h0a1.43,1.43,0,0,0-.46.15,1.14,1.14,0,0,0-.27.2.93.93,0,0,0-.22.34h0V8h0a.68.68,0,0,0,0,.17.67.67,0,0,0,.07.3v0h0l0,.05A.69.69,0,0,1,7.63,9a1,1,0,0,1-.07.35,1,1,0,0,1-.22.34,1,1,0,0,0,.48-.36A1,1,0,0,0,8,9a1.52,1.52,0,0,0,0-.24.54.54,0,0,1-.31-.49Z"/><path class="cls-3" d="M9.24,8.67A.16.16,0,1,1,9,8.54l-.1-.11a0,0,0,0,1,0-.06h0l.2.16.12.09v0A.15.15,0,0,1,9.24,8.67Z"/><path class="cls-3" d="M9.17,9.26l0,0H9.06l-.15,0h0l-.08,0h0a.57.57,0,0,1-.16-.09.14.14,0,0,1,0-.1V8.93a.66.66,0,0,0,.21.22l.05,0a.79.79,0,0,0,.24.08Z"/><path class="cls-3" d="M9.54,8.39l0,0-.08,0,0,0-.23-.1a.73.73,0,0,1,0,1l-.05,0h0a.73.73,0,0,1-1-.14,1,1,0,0,1-.12.22,1,1,0,0,0,1.62-1Z"/><circle class="cls-1" cx="10.13" cy="11.31" r="3.09"/><circle class="cls-2" cx="10.13" cy="11.31" r="2.32"/><path class="cls-3" d="M11.14,10a2.17,2.17,0,0,0-.19.32h0l0,0a1.66,1.66,0,0,0-1.25,0,1,1,0,0,0-.81,1.05h0v0h0a1.11,1.11,0,0,1,.63-1.42l.06,0,.18-.06h.21A2.17,2.17,0,0,1,11.14,10Z"/><path class="cls-3" d="M11.46,11.21a1.68,1.68,0,0,1-.16.18l-.06.05h0L11,11.33l-.26-.1a1.56,1.56,0,0,0-.39-.08.55.55,0,0,0-.28-.24,2,2,0,0,1,1.12-.14Z"/><path class="cls-3" d="M9.89,11a.44.44,0,1,0,0,.88.43.43,0,0,0,.23-.06A.44.44,0,0,0,9.89,11Z"/><path class="cls-3" d="M9.35,11.42a.54.54,0,0,1,.54-.54h0A2.38,2.38,0,0,1,11,10.66a1.07,1.07,0,0,0-.12-.17,1.53,1.53,0,0,0-.86-.11h0a1.43,1.43,0,0,0-.46.15,1.14,1.14,0,0,0-.27.2.93.93,0,0,0-.22.34h0v0H9a.68.68,0,0,0,0,.17.67.67,0,0,0,.07.3v0h0l0,.05a.69.69,0,0,1,.13.45,1,1,0,0,1-.07.35,1,1,0,0,1-.22.34,1,1,0,0,0,.48-.36,1,1,0,0,0,.16-.32,1.52,1.52,0,0,0,0-.24.54.54,0,0,1-.31-.49Z"/><path class="cls-3" d="M10.88,11.84a.16.16,0,1,1-.24-.13l-.1-.11a0,0,0,0,1,0-.06h0l.2.16.12.09v0A.15.15,0,0,1,10.88,11.84Z"/><path class="cls-3" d="M10.81,12.43l0,0H10.7l-.15,0h0l-.08,0h0a.57.57,0,0,1-.16-.09.14.14,0,0,1,0-.1v-.11a.66.66,0,0,0,.21.22l.05,0a.79.79,0,0,0,.24.08Z"/><path class="cls-3" d="M11.18,11.55l0,0-.08,0,0,0-.23-.1a.73.73,0,0,1,0,1l-.05,0h0a.73.73,0,0,1-1-.14,1,1,0,0,1-.12.22,1,1,0,0,0,1.62-1Z"/><circle class="cls-1" cx="14.59" cy="12.05" r="3.09"/><circle class="cls-2" cx="14.59" cy="12.05" r="2.32"/><path class="cls-3" d="M15.6,10.72a2.17,2.17,0,0,0-.19.32h0l0,0a1.66,1.66,0,0,0-1.25,0,1,1,0,0,0-.81,1.05h0v0h0a1.11,1.11,0,0,1,.63-1.42l.06,0,.18-.06h.21A2.17,2.17,0,0,1,15.6,10.72Z"/><path class="cls-3" d="M15.92,12a1.68,1.68,0,0,1-.16.18l-.06.05h0l-.22-.12-.26-.1a1.56,1.56,0,0,0-.39-.08.55.55,0,0,0-.28-.24,2,2,0,0,1,1.12-.14Z"/><path class="cls-3" d="M14.35,11.72a.44.44,0,1,0,0,.88.43.43,0,0,0,.23-.06.44.44,0,0,0-.23-.82Z"/><path class="cls-3" d="M13.81,12.16a.54.54,0,0,1,.54-.54h0a2.38,2.38,0,0,1,1.09-.22,1.07,1.07,0,0,0-.12-.17,1.53,1.53,0,0,0-.86-.11h0a1.43,1.43,0,0,0-.46.15,1.14,1.14,0,0,0-.27.2.93.93,0,0,0-.Line truncated
|
||||
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,99 @@
|
||||
(function(){'use strict';var f,aa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},g=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a},ba=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");
|
||||
},ca=ba(this),da=function(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&g(c,a,{configurable:!0,writable:!0,value:b})}};
|
||||
da("Symbol",function(a){if(a)return a;var b=function(h,k){this.g=h;g(this,"description",{configurable:!0,writable:!0,value:k})};b.prototype.toString=function(){return this.g};var c="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",d=0,e=function(h){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new b(c+(h||"")+"_"+d++,h)};return e});
|
||||
da("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");g(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ea(aa(this))}});return a});var ea=function(a){a={next:a};a[Symbol.iterator]=function(){return this};return a},fa=typeof Object.create=="function"?Object.create:function(a){var b=function(){};b.prototype=a;return new b},l;
|
||||
if(typeof Object.setPrototypeOf=="function")l=Object.setPrototypeOf;else{var n;a:{var ha={a:!0},ia={};try{ia.__proto__=ha;n=ia.a;break a}catch(a){}n=!1}l=n?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
|
||||
var ja=l,q=function(a,b){a.prototype=fa(b.prototype);a.prototype.constructor=a;if(ja)ja(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.sc=b.prototype},ka=function(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");};/*
|
||||
|
||||
Copyright The Closure Library Authors.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
var r=this||self,u=function(a){var b=typeof a;b=b!="object"?b:a?Array.isArray(a)?"array":b:"null";return b=="array"||b=="object"&&typeof a.length=="number"},v="closure_uid_"+(Math.random()*1E9>>>0),la=0,ma=function(a,b,c){return a.call.apply(a.bind,arguments)},na=function(a,b,c){if(!a)throw Error();if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,
|
||||
arguments)}},w=function(a,b,c){w=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?ma:na;return w.apply(null,arguments)},x=function(a,b){a=a.split(".");for(var c=r,d;a.length&&(d=a.shift());)a.length||b===void 0?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};var chrome=chrome||window.chrome||{};chrome.cast=chrome.cast||{};chrome.cast.media=chrome.cast.media||{};chrome.cast.ReceiverActionListener={};chrome.cast.VERSION=[1,2];x("chrome.cast.VERSION",chrome.cast.VERSION);chrome.cast.rc=!0;x("chrome.cast.usingPresentationApi",chrome.cast.rc);chrome.cast.Na=function(a,b){this.credentials=a;this.credentialsType=b===void 0?"web":b};x("chrome.cast.CredentialsData",chrome.cast.Na);chrome.cast.Error=function(a,b,c){this.code=a;this.description=b||null;this.details=c||null};x("chrome.cast.Error",chrome.cast.Error);
|
||||
chrome.cast.nb=function(a){this.platform=a;this.packageId=this.url=null};x("chrome.cast.SenderApplication",chrome.cast.nb);chrome.cast.Image=function(a){this.url=a;this.width=this.height=null};x("chrome.cast.Image",chrome.cast.Image);chrome.cast.Volume=function(a,b){this.level=a===void 0?null:a;this.muted=b===void 0?null:b};x("chrome.cast.Volume",chrome.cast.Volume);chrome.cast.ha={CUSTOM_CONTROLLER_SCOPED:"custom_controller_scoped",TAB_AND_ORIGIN_SCOPED:"tab_and_origin_scoped",ORIGIN_SCOPED:"origin_scoped",PAGE_SCOPED:"page_scoped"};x("chrome.cast.AutoJoinPolicy",chrome.cast.ha);chrome.cast.ja={CREATE_SESSION:"create_session",CAST_THIS_TAB:"cast_this_tab"};x("chrome.cast.DefaultActionPolicy",chrome.cast.ja);chrome.cast.Ma={VIDEO_OUT:"video_out",AUDIO_OUT:"audio_out",VIDEO_IN:"video_in",AUDIO_IN:"audio_in",MULTIZONE_GROUP:"multizone_group"};
|
||||
x("chrome.cast.Capability",chrome.cast.Ma);chrome.cast.A={CANCEL:"cancel",TIMEOUT:"timeout",API_NOT_INITIALIZED:"api_not_initialized",INVALID_PARAMETER:"invalid_parameter",EXTENSION_NOT_COMPATIBLE:"extension_not_compatible",EXTENSION_MISSING:"extension_missing",RECEIVER_UNAVAILABLE:"receiver_unavailable",SESSION_ERROR:"session_error",CHANNEL_ERROR:"channel_error",LOAD_MEDIA_FAILED:"load_media_failed"};x("chrome.cast.ErrorCode",chrome.cast.A);chrome.cast.N={AVAILABLE:"available",UNAVAILABLE:"unavailable"};
|
||||
x("chrome.cast.ReceiverAvailability",chrome.cast.N);chrome.cast.ob={CHROME:"chrome",IOS:"ios",ANDROID:"android"};x("chrome.cast.SenderPlatform",chrome.cast.ob);chrome.cast.xa={CAST:"cast",DIAL:"dial",HANGOUT:"hangout",CUSTOM:"custom"};x("chrome.cast.ReceiverType",chrome.cast.xa);chrome.cast.Qa={RUNNING:"running",STOPPED:"stopped",ERROR:"error"};x("chrome.cast.DialAppState",chrome.cast.Qa);chrome.cast.jb={CAST:"cast",STOP:"stop"};x("chrome.cast.ReceiverAction",chrome.cast.jb);
|
||||
chrome.cast.K={CONNECTED:"connected",DISCONNECTED:"disconnected",STOPPED:"stopped"};x("chrome.cast.SessionStatus",chrome.cast.K);chrome.cast.Db={ATTENUATION:"attenuation",FIXED:"fixed",MASTER:"master"};x("chrome.cast.VolumeControlType",chrome.cast.Db);var oa=/&/g,pa=/</g,qa=/>/g,ra=/"/g,sa=/'/g,ta=/\x00/g,ua=/[\x00&<>"']/;/*
|
||||
|
||||
Copyright Google LLC
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
var va={};function wa(){if(va!==va)throw Error("Bad secret");};var xa=globalThis.trustedTypes,y;function ya(){var a=null;if(!xa)return a;try{var b=function(c){return c};a=xa.createPolicy("goog#html",{createHTML:b,createScript:b,createScriptURL:b})}catch(c){throw c;}return a};var z=function(a){wa();this.g=a};z.prototype.toString=function(){return this.g};new z("about:blank");new z("about:invalid#zClosurez");var za=[],Aa=function(a){console.warn("A URL with content '"+a+"' was sanitized away.")};za.indexOf(Aa)===-1&&za.push(Aa);var A=function(a){wa();this.g=a};A.prototype.toString=function(){return this.g+""};var Ba=Array.prototype.forEach?function(a,b){Array.prototype.forEach.call(a,b,void 0)}:function(a,b){for(var c=a.length,d=typeof a==="string"?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)};function Ca(a,b){for(var c=a.length,d=typeof a==="string"?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return e;return-1};var Da=Object.freeze||function(a){return a};var Fa=function(a){var b={"&":"&","<":"<",">":">",""":'"'};var c=r.document.createElement("div");return a.replace(Ea,function(d,e){var h=b[d];if(h)return h;e.charAt(0)=="#"&&(e=Number("0"+e.slice(1)),isNaN(e)||(h=String.fromCharCode(e)));if(!h){h=d+" ";y===void 0&&(y=ya());h=(e=y)?e.createHTML(h):h;h=new A(h);if(c.nodeType===1&&(e=c.tagName,/^(script|style)$/i.test(e)))throw d=e.toLowerCase()==="script"?"Use setScriptTextContent with a SafeScript.":"Use setStyleTextContent with a SafeStyleSheet.",
|
||||
Error(d);if(h instanceof A)h=h.g;else throw Error("Unexpected type when unwrapping SafeHtml");c.innerHTML=h;h=c.firstChild.nodeValue.slice(0,-1)}return b[d]=h})},Ga=function(a){return a.replace(/&([^;]+);/g,function(b,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return c.charAt(0)!="#"||(c=Number("0"+c.slice(1)),isNaN(c))?b:String.fromCharCode(c)}})},Ea=/&([^;\s<&]+);?/g;chrome.cast.Ia=function(a,b,c,d,e){this.sessionRequest=a;this.sessionListener=b;this.receiverListener=c;this.autoJoinPolicy=d||chrome.cast.ha.TAB_AND_ORIGIN_SCOPED;this.defaultActionPolicy=e||chrome.cast.ja.CREATE_SESSION;this.customDialLaunchCallback=null;this.invisibleSender=!1;this.additionalSessionRequests=[]};x("chrome.cast.ApiConfig",chrome.cast.Ia);chrome.cast.Ta=function(a,b){this.appName=a;this.launchParameter=b||null};x("chrome.cast.DialRequest",chrome.cast.Ta);
|
||||
chrome.cast.Ra=function(a,b,c){this.receiver=a;this.appState=b;this.extraData=c||null};x("chrome.cast.DialLaunchData",chrome.cast.Ra);chrome.cast.Sa=function(a,b){this.doLaunch=a;this.launchParameter=b||null};x("chrome.cast.DialLaunchResponse",chrome.cast.Sa);
|
||||
chrome.cast.pb=function(a,b,c,d,e){c=c===void 0?chrome.cast.timeout.requestSession:c;this.appId=a;this.capabilities=Array.isArray(b)?b:[];this.requestSessionTimeout=c;this.dialRequest=this.language=null;this.androidReceiverCompatible=d===void 0?!1:d;this.credentialsData=e===void 0?null:e};x("chrome.cast.SessionRequest",chrome.cast.pb);
|
||||
chrome.cast.ib=function(a,b,c,d){this.label=a;a=b;ua.test(a)&&(a.indexOf("&")!=-1&&(a=a.replace(oa,"&")),a.indexOf("<")!=-1&&(a=a.replace(pa,"<")),a.indexOf(">")!=-1&&(a=a.replace(qa,">")),a.indexOf('"')!=-1&&(a=a.replace(ra,""")),a.indexOf("'")!=-1&&(a=a.replace(sa,"'")),a.indexOf("\x00")!=-1&&(a=a.replace(ta,"�")));this.friendlyName=a;this.capabilities=c||[];this.volume=d||null;this.receiverType=chrome.cast.xa.CAST;this.displayStatus=this.isActiveInput=null};
|
||||
x("chrome.cast.Receiver",chrome.cast.ib);chrome.cast.kb=function(a,b){this.statusText=a;this.appImages=b;this.showStop=null};x("chrome.cast.ReceiverDisplayStatus",chrome.cast.kb);chrome.cast.Aa=function(){this.requestSession=6E4;this.getDialAppInfo=this.sendCustomMessage=this.setReceiverVolume=this.stopSession=this.leaveSession=3E3};x("chrome.cast.Timeout",chrome.cast.Aa);chrome.cast.timeout=new chrome.cast.Aa;x("chrome.cast.timeout",chrome.cast.timeout);chrome.cast.Ha="auto-join";
|
||||
chrome.cast.cb="cast-session_";chrome.cast.media.Va={SDR:"sdr",HDR:"hdr",DV:"dv"};x("chrome.cast.media.HdrType",chrome.cast.media.Va);chrome.cast.media.Wa={AAC:"aac",AC3:"ac3",MP3:"mp3",TS:"ts",TS_AAC:"ts_aac",E_AC3:"e_ac3",FMP4:"fmp4"};x("chrome.cast.media.HlsSegmentFormat",chrome.cast.media.Wa);chrome.cast.media.Xa={MPEG2_TS:"mpeg2_ts",FMP4:"fmp4"};x("chrome.cast.media.HlsVideoSegmentFormat",chrome.cast.media.Xa);chrome.cast.media.ab={PAUSE:"pause",SEEK:"seek",STREAM_VOLUME:"stream_volume",STREAM_MUTE:"stream_mute"};
|
||||
x("chrome.cast.media.MediaCommand",chrome.cast.media.ab);chrome.cast.media.gb={ALBUM:"ALBUM",PLAYLIST:"PLAYLIST",AUDIOBOOK:"AUDIOBOOK",RADIO_STATION:"RADIO_STATION",PODCAST_SERIES:"PODCAST_SERIES",TV_SERIES:"TV_SERIES",VIDEO_PLAYLIST:"VIDEO_PLAYLIST",LIVE_TV:"LIVE_TV",MOVIE:"MOVIE"};x("chrome.cast.media.QueueType",chrome.cast.media.gb);chrome.cast.media.U={GENERIC_CONTAINER:0,AUDIOBOOK_CONTAINER:1};x("chrome.cast.media.ContainerType",chrome.cast.media.U);
|
||||
chrome.cast.media.F={GENERIC:0,MOVIE:1,TV_SHOW:2,MUSIC_TRACK:3,PHOTO:4,AUDIOBOOK_CHAPTER:5};x("chrome.cast.media.MetadataType",chrome.cast.media.F);chrome.cast.media.B={IDLE:"IDLE",PLAYING:"PLAYING",PAUSED:"PAUSED",BUFFERING:"BUFFERING"};x("chrome.cast.media.PlayerState",chrome.cast.media.B);chrome.cast.media.V={OFF:"REPEAT_OFF",ALL:"REPEAT_ALL",SINGLE:"REPEAT_SINGLE",ALL_AND_SHUFFLE:"REPEAT_ALL_AND_SHUFFLE"};x("chrome.cast.media.RepeatMode",chrome.cast.media.V);
|
||||
chrome.cast.media.lb={PLAYBACK_START:"PLAYBACK_START",PLAYBACK_PAUSE:"PLAYBACK_PAUSE"};x("chrome.cast.media.ResumeState",chrome.cast.media.lb);chrome.cast.media.za={BUFFERED:"BUFFERED",LIVE:"LIVE",OTHER:"OTHER"};x("chrome.cast.media.StreamType",chrome.cast.media.za);chrome.cast.media.Ya={CANCELLED:"CANCELLED",INTERRUPTED:"INTERRUPTED",FINISHED:"FINISHED",ERROR:"ERROR"};x("chrome.cast.media.IdleReason",chrome.cast.media.Ya);chrome.cast.media.yb={TEXT:"TEXT",AUDIO:"AUDIO",VIDEO:"VIDEO"};
|
||||
x("chrome.cast.media.TrackType",chrome.cast.media.yb);chrome.cast.media.ub={SUBTITLES:"SUBTITLES",CAPTIONS:"CAPTIONS",DESCRIPTIONS:"DESCRIPTIONS",CHAPTERS:"CHAPTERS",METADATA:"METADATA"};x("chrome.cast.media.TextTrackType",chrome.cast.media.ub);chrome.cast.media.qb={NONE:"NONE",OUTLINE:"OUTLINE",DROP_SHADOW:"DROP_SHADOW",RAISED:"RAISED",DEPRESSED:"DEPRESSED"};x("chrome.cast.media.TextTrackEdgeType",chrome.cast.media.qb);chrome.cast.media.wb={NONE:"NONE",NORMAL:"NORMAL",ROUNDED_CORNERS:"ROUNDED_CORNERS"};
|
||||
x("chrome.cast.media.TextTrackWindowType",chrome.cast.media.wb);chrome.cast.media.rb={SANS_SERIF:"SANS_SERIF",MONOSPACED_SANS_SERIF:"MONOSPACED_SANS_SERIF",SERIF:"SERIF",MONOSPACED_SERIF:"MONOSPACED_SERIF",CASUAL:"CASUAL",CURSIVE:"CURSIVE",SMALL_CAPITALS:"SMALL_CAPITALS"};x("chrome.cast.media.TextTrackFontGenericFamily",chrome.cast.media.rb);chrome.cast.media.sb={NORMAL:"NORMAL",BOLD:"BOLD",BOLD_ITALIC:"BOLD_ITALIC",ITALIC:"ITALIC"};x("chrome.cast.media.TextTrackFontStyle",chrome.cast.media.sb);
|
||||
chrome.cast.media.zb={LIKE:"LIKE",DISLIKE:"DISLIKE",FOLLOW:"FOLLOW",UNFOLLOW:"UNFOLLOW"};x("chrome.cast.media.UserAction",chrome.cast.media.zb);chrome.cast.media.la=function(){this.customData=null};x("chrome.cast.media.GetStatusRequest",chrome.cast.media.la);chrome.cast.media.pa=function(){this.customData=null};x("chrome.cast.media.PauseRequest",chrome.cast.media.pa);chrome.cast.media.ra=function(){this.customData=null};x("chrome.cast.media.PlayRequest",chrome.cast.media.ra);chrome.cast.media.mb=function(){this.customData=this.resumeState=this.currentTime=null};x("chrome.cast.media.SeekRequest",chrome.cast.media.mb);
|
||||
chrome.cast.media.ya=function(){this.customData=null};x("chrome.cast.media.StopRequest",chrome.cast.media.ya);chrome.cast.media.Eb=function(a){this.volume=a;this.customData=null};x("chrome.cast.media.VolumeRequest",chrome.cast.media.Eb);
|
||||
chrome.cast.media.Za=function(a){this.type="LOAD";this.requestId=0;this.sessionId=null;this.media=a;this.activeTrackIds=null;this.autoplay=!0;this.atvCredentialsType=this.atvCredentials=this.credentialsType=this.credentials=void 0;this.customData=this.currentTime=null;this.queueData=this.playbackRate=void 0};x("chrome.cast.media.LoadRequest",chrome.cast.media.Za);chrome.cast.media.Ua=function(a,b){this.requestId=0;this.activeTrackIds=a||null;this.textTrackStyle=b||null};
|
||||
x("chrome.cast.media.EditTracksInfoRequest",chrome.cast.media.Ua);chrome.cast.media.T=function(a){this.containerType=a=a===void 0?chrome.cast.media.U.GENERIC_CONTAINER:a;this.containerDuration=this.containerImages=this.sections=this.title=void 0};x("chrome.cast.media.ContainerMetadata",chrome.cast.media.T);
|
||||
chrome.cast.media.MediaMetadata=function(a){this.metadataType=this.type=a;this.queueItemId=this.sectionStartTimeInContainer=this.sectionStartAbsoluteTime=this.sectionStartTimeInMedia=this.sectionDuration=void 0};x("chrome.cast.media.MediaMetadata",chrome.cast.media.MediaMetadata);chrome.cast.media.ka=function(){chrome.cast.media.MediaMetadata.call(this,chrome.cast.media.F.GENERIC);this.releaseDate=this.releaseYear=this.images=this.subtitle=this.title=void 0};q(chrome.cast.media.ka,chrome.cast.media.MediaMetadata);
|
||||
x("chrome.cast.media.GenericMediaMetadata",chrome.cast.media.ka);chrome.cast.media.na=function(){chrome.cast.media.MediaMetadata.call(this,chrome.cast.media.F.MOVIE);this.releaseDate=this.releaseYear=this.images=this.subtitle=this.studio=this.title=void 0};q(chrome.cast.media.na,chrome.cast.media.MediaMetadata);x("chrome.cast.media.MovieMediaMetadata",chrome.cast.media.na);
|
||||
chrome.cast.media.Ba=function(){chrome.cast.media.MediaMetadata.call(this,chrome.cast.media.F.TV_SHOW);this.originalAirdate=this.releaseYear=this.images=this.episode=this.episodeNumber=this.season=this.seasonNumber=this.episodeTitle=this.title=this.seriesTitle=void 0};q(chrome.cast.media.Ba,chrome.cast.media.MediaMetadata);x("chrome.cast.media.TvShowMediaMetadata",chrome.cast.media.Ba);
|
||||
chrome.cast.media.oa=function(){chrome.cast.media.MediaMetadata.call(this,chrome.cast.media.F.MUSIC_TRACK);this.releaseDate=this.releaseYear=this.images=this.discNumber=this.trackNumber=this.artistName=this.songName=this.composer=this.artist=this.albumArtist=this.title=this.albumName=void 0};q(chrome.cast.media.oa,chrome.cast.media.MediaMetadata);x("chrome.cast.media.MusicTrackMediaMetadata",chrome.cast.media.oa);
|
||||
chrome.cast.media.qa=function(){chrome.cast.media.MediaMetadata.call(this,chrome.cast.media.F.PHOTO);this.creationDateTime=this.height=this.width=this.longitude=this.latitude=this.images=this.location=this.artist=this.title=void 0};q(chrome.cast.media.qa,chrome.cast.media.MediaMetadata);x("chrome.cast.media.PhotoMediaMetadata",chrome.cast.media.qa);
|
||||
chrome.cast.media.ga=function(){chrome.cast.media.T.call(this,chrome.cast.media.U.AUDIOBOOK_CONTAINER);this.releaseDate=this.publisher=this.narrators=this.authors=void 0};q(chrome.cast.media.ga,chrome.cast.media.T);x("chrome.cast.media.AudiobookContainerMetadata",chrome.cast.media.ga);chrome.cast.media.fa=function(){chrome.cast.media.MediaMetadata.call(this,chrome.cast.media.F.AUDIOBOOK_CHAPTER);this.images=this.subtitle=this.bookTitle=this.chapterNumber=this.title=this.chapterTitle=void 0};
|
||||
q(chrome.cast.media.fa,chrome.cast.media.MediaMetadata);x("chrome.cast.media.AudiobookChapterMediaMetadata",chrome.cast.media.fa);
|
||||
chrome.cast.media.bb=function(a,b){this.contentId=a;this.contentUrl=void 0;this.streamType=chrome.cast.media.za.BUFFERED;this.contentType=b===void 0?"":b;this.metadata=null;this.atvEntity=this.entity=void 0;this.duration=null;this.startAbsoluteTime=void 0;this.customData=this.textTrackStyle=this.tracks=null;this.userActionStates=this.hlsVideoSegmentFormat=this.hlsSegmentFormat=this.vmapAdsRequest=this.breakClips=this.breaks=void 0};x("chrome.cast.media.MediaInfo",chrome.cast.media.bb);
|
||||
chrome.cast.media.ta=function(a){this.itemId=null;this.media=a;this.autoplay=!0;this.startTime=0;this.playbackDuration=null;this.preloadTime=0;this.customData=this.activeTrackIds=null};x("chrome.cast.media.QueueItem",chrome.cast.media.ta);chrome.cast.media.Pa="CC1AD845";x("chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID",chrome.cast.media.Pa);chrome.cast.media.timeout={};chrome.cast.media.timeout.load=0;x("chrome.cast.media.timeout.load",chrome.cast.media.timeout.load);
|
||||
chrome.cast.media.timeout.P=0;x("chrome.cast.media.timeout.getStatus",chrome.cast.media.timeout.P);chrome.cast.media.timeout.play=0;x("chrome.cast.media.timeout.play",chrome.cast.media.timeout.play);chrome.cast.media.timeout.pause=0;x("chrome.cast.media.timeout.pause",chrome.cast.media.timeout.pause);chrome.cast.media.timeout.seek=0;x("chrome.cast.media.timeout.seek",chrome.cast.media.timeout.seek);chrome.cast.media.timeout.stop=0;x("chrome.cast.media.timeout.stop",chrome.cast.media.timeout.stop);
|
||||
chrome.cast.media.timeout.R=0;x("chrome.cast.media.timeout.setVolume",chrome.cast.media.timeout.R);chrome.cast.media.timeout.O=0;x("chrome.cast.media.timeout.editTracksInfo",chrome.cast.media.timeout.O);chrome.cast.media.timeout.v=0;x("chrome.cast.media.timeout.queue",chrome.cast.media.timeout.v);chrome.cast.media.xb=function(a,b){this.trackId=a;this.trackContentType=this.trackContentId=null;this.type=b;this.customData=this.subtype=this.language=this.name=null};x("chrome.cast.media.Track",chrome.cast.media.xb);
|
||||
chrome.cast.media.tb=function(){this.customData=this.fontStyle=this.fontGenericFamily=this.fontFamily=this.fontScale=this.windowRoundedCornerRadius=this.windowColor=this.windowType=this.edgeColor=this.edgeType=this.backgroundColor=this.foregroundColor=null};x("chrome.cast.media.TextTrackStyle",chrome.cast.media.tb);chrome.cast.media.fb=function(a){this.type="QUEUE_LOAD";this.sessionId=this.requestId=null;this.items=a;this.startIndex=0;this.repeatMode=chrome.cast.media.V.OFF;this.customData=null};
|
||||
x("chrome.cast.media.QueueLoadRequest",chrome.cast.media.fb);chrome.cast.media.sa=function(a){this.type="QUEUE_INSERT";this.sessionId=this.requestId=null;this.items=a;this.customData=this.insertBefore=null};x("chrome.cast.media.QueueInsertItemsRequest",chrome.cast.media.sa);chrome.cast.media.hb=function(a){this.type="QUEUE_UPDATE";this.sessionId=this.requestId=null;this.items=a;this.customData=null};x("chrome.cast.media.QueueUpdateItemsRequest",chrome.cast.media.hb);
|
||||
chrome.cast.media.M=function(){this.type="QUEUE_UPDATE";this.customData=this.jump=this.currentItemId=this.sessionId=this.requestId=null};x("chrome.cast.media.QueueJumpRequest",chrome.cast.media.M);chrome.cast.media.wa=function(){this.type="QUEUE_UPDATE";this.customData=this.repeatMode=this.sessionId=this.requestId=null};x("chrome.cast.media.QueueSetPropertiesRequest",chrome.cast.media.wa);
|
||||
chrome.cast.media.ua=function(a){this.type="QUEUE_REMOVE";this.sessionId=this.requestId=null;this.itemIds=a;this.customData=null};x("chrome.cast.media.QueueRemoveItemsRequest",chrome.cast.media.ua);chrome.cast.media.va=function(a){this.type="QUEUE_REORDER";this.sessionId=this.requestId=null;this.itemIds=a;this.customData=this.insertBefore=null};x("chrome.cast.media.QueueReorderItemsRequest",chrome.cast.media.va);
|
||||
chrome.cast.media.Ja=function(a,b,c){this.id=a;this.breakClipIds=b;this.position=c;this.duration=void 0;this.isWatched=!1;this.isEmbedded=void 0};x("chrome.cast.media.Break",chrome.cast.media.Ja);chrome.cast.media.Ka=function(a){this.id=a;this.vastAdsRequest=this.customData=this.hlsSegmentFormat=this.clickThroughUrl=this.posterUrl=this.whenSkippable=this.duration=this.title=this.contentType=this.contentUrl=this.contentId=void 0};x("chrome.cast.media.BreakClip",chrome.cast.media.Ka);
|
||||
chrome.cast.media.Bb=function(){this.adsResponse=this.adTagUrl=void 0};x("chrome.cast.media.VastAdsRequest",chrome.cast.media.Bb);chrome.cast.media.La=function(){this.whenSkippable=this.breakClipId=this.breakId=this.currentBreakClipTime=this.currentBreakTime=void 0};x("chrome.cast.media.BreakStatus",chrome.cast.media.La);chrome.cast.media.ma=function(a,b,c,d){this.start=a;this.end=b;this.isMovingWindow=c;this.isLiveDone=d};x("chrome.cast.media.LiveSeekableRange",chrome.cast.media.ma);
|
||||
chrome.cast.media.eb=function(a,b,c,d,e,h,k){this.id=a;this.queueType=this.entity=void 0;this.name=b;this.description=c;this.repeatMode=d;this.shuffle=!1;this.items=e;this.startIndex=h;this.startTime=k;this.containerMetadata=void 0};x("chrome.cast.media.QueueData",chrome.cast.media.eb);chrome.cast.media.Ab=function(a){this.userAction=a;this.customData=void 0};x("chrome.cast.media.UserActionState",chrome.cast.media.Ab);chrome.cast.media.Cb=function(a,b,c){this.width=a;this.height=b;this.hdrType=c};
|
||||
x("chrome.cast.media.VideoInformation",chrome.cast.media.Cb);var B=null;chrome.cast.media.h=function(a,b){this.sessionId=a;this.mediaSessionId=b;this.media=null;this.videoInfo=this.queueData=void 0;this.playbackRate=1;this.playerState=chrome.cast.media.B.IDLE;this.currentTime=0;this.g=-1;this.supportedMediaCommands=[];this.volume=new chrome.cast.Volume;this.items=this.preloadedItemId=this.loadingItemId=this.currentItemId=this.customData=this.activeTrackIds=this.idleReason=null;this.repeatMode=chrome.cast.media.V.OFF;this.breakStatus=void 0;this.l=!1;this.i=[];this.liveSeekableRange=
|
||||
void 0};f=chrome.cast.media.h.prototype;f.P=function(a,b,c){a||(a=new chrome.cast.media.la);B.m(this,"MEDIA_GET_STATUS",a,b,c,chrome.cast.media.timeout.P)};f.play=function(a,b,c){var d=B;a||(a=new chrome.cast.media.ra);d.m(this,"PLAY",a,b,c,chrome.cast.media.timeout.play)};f.pause=function(a,b,c){var d=B;a||(a=new chrome.cast.media.pa);d.m(this,"PAUSE",a,b,c,chrome.cast.media.timeout.pause)};f.seek=function(a,b,c){B.m(this,"SEEK",a,b,c,chrome.cast.media.timeout.seek)};
|
||||
f.stop=function(a,b,c){a||(a=new chrome.cast.media.ya);B.m(this,"STOP_MEDIA",a,b,c,chrome.cast.media.timeout.stop)};f.R=function(a,b,c){B.m(this,"MEDIA_SET_VOLUME",a,b,c,chrome.cast.media.timeout.R)};f.O=function(a,b,c){B.m(this,"EDIT_TRACKS_INFO",a,b,c,chrome.cast.media.timeout.O)};f.Tb=function(a,b,c){B.m(this,"QUEUE_INSERT",a,b,c,chrome.cast.media.timeout.v)};f.Sb=function(a,b,c){B.m(this,"QUEUE_INSERT",new chrome.cast.media.sa([a]),b,c,chrome.cast.media.timeout.v)};
|
||||
f.dc=function(a,b,c){B.m(this,"QUEUE_UPDATE",a,b,c,chrome.cast.media.timeout.v)};f.Yb=function(a,b){var c=new chrome.cast.media.M;c.jump=-1;B.m(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.v)};f.Xb=function(a,b){var c=new chrome.cast.media.M;c.jump=1;B.m(this,"QUEUE_UPDATE",c,a,b,chrome.cast.media.timeout.v)};f.Ub=function(a,b,c){if(!(C(this,a)<0)){var d=new chrome.cast.media.M;d.currentItemId=a;B.m(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.v)}};
|
||||
f.cc=function(a,b,c){var d=new chrome.cast.media.wa;d.repeatMode=a;B.m(this,"QUEUE_UPDATE",d,b,c,chrome.cast.media.timeout.v)};f.ac=function(a,b,c){B.m(this,"QUEUE_REMOVE",a,b,c,chrome.cast.media.timeout.v)};f.Zb=function(a,b,c){C(this,a)<0||B.m(this,"QUEUE_REMOVE",new chrome.cast.media.ua([a]),b,c,chrome.cast.media.timeout.v)};f.bc=function(a,b,c){B.m(this,"QUEUE_REORDER",a,b,c,chrome.cast.media.timeout.v)};
|
||||
f.Wb=function(a,b,c,d){var e=C(this,a);if(!(e<0))if(b<0)d&&d(new chrome.cast.Error(chrome.cast.A.INVALID_PARAMETER));else if(e==b)c&&c();else{var h=null;b=b>e?b+1:b;b<this.items.length&&(h=this.items[b]);a=new chrome.cast.media.va([a]);a.insertBefore=h?h.itemId:null;B.m(this,"QUEUE_REORDER",a,c,d,chrome.cast.media.timeout.v)}};f.qc=function(a){return this.supportedMediaCommands.indexOf(a)>-1};
|
||||
f.Nb=function(){if(this.playerState==chrome.cast.media.B.PLAYING&&this.g>=0){var a=this.currentTime+(Date.now()-this.g)/1E3*this.playbackRate;this.media&&this.media.duration!=null&&a>this.media.duration&&this.media.duration!=-1&&(a=this.media.duration);a<0&&(a=0);return a}return this.currentTime};f.Lb=function(){if(this.breakStatus&&this.breakStatus.currentBreakTime!==void 0)return this.playerState==chrome.cast.media.B.PLAYING&&this.g>=0?this.breakStatus.currentBreakTime+(Date.now()-this.g)/1E3:this.breakStatus.currentBreakTime};
|
||||
f.Kb=function(){if(this.breakStatus&&this.breakStatus.currentBreakClipTime!==void 0)return this.playerState==chrome.cast.media.B.PLAYING&&this.g>=0?this.breakStatus.currentBreakClipTime+(Date.now()-this.g)/1E3:this.breakStatus.currentBreakClipTime};
|
||||
f.Mb=function(){if(this.liveSeekableRange&&this.liveSeekableRange.start!==void 0&&this.liveSeekableRange.end!==void 0){if(this.playerState==chrome.cast.media.B.PLAYING&&this.g>=0){var a=(Date.now()-this.g)/1E3,b=new chrome.cast.media.ma;b.isMovingWindow=this.liveSeekableRange.isMovingWindow;b.isLiveDone=this.liveSeekableRange.isLiveDone;b.start=b.isMovingWindow?this.liveSeekableRange.start+a:this.liveSeekableRange.start;b.end=b.isLiveDone?this.liveSeekableRange.end:this.liveSeekableRange.end+a;return b}return this.liveSeekableRange}};
|
||||
f.Y=function(a){B.Gb(this,a)};f.ba=function(a){B.fc(this,a)};var C=function(a,b){return Ca(a.items,function(c){return c.itemId==b})};x("chrome.cast.media.Media",chrome.cast.media.h);chrome.cast.media.h.prototype.removeUpdateListener=chrome.cast.media.h.prototype.ba;chrome.cast.media.h.prototype.addUpdateListener=chrome.cast.media.h.prototype.Y;chrome.cast.media.h.prototype.getEstimatedLiveSeekableRange=chrome.cast.media.h.prototype.Mb;chrome.cast.media.h.prototype.getEstimatedBreakClipTime=chrome.cast.media.h.prototype.Kb;
|
||||
chrome.cast.media.h.prototype.getEstimatedBreakTime=chrome.cast.media.h.prototype.Lb;chrome.cast.media.h.prototype.getEstimatedTime=chrome.cast.media.h.prototype.Nb;chrome.cast.media.h.prototype.supportsCommand=chrome.cast.media.h.prototype.qc;chrome.cast.media.h.prototype.queueMoveItemToNewIndex=chrome.cast.media.h.prototype.Wb;chrome.cast.media.h.prototype.queueReorderItems=chrome.cast.media.h.prototype.bc;chrome.cast.media.h.prototype.queueRemoveItem=chrome.cast.media.h.prototype.Zb;
|
||||
chrome.cast.media.h.prototype.queueRemoveItems=chrome.cast.media.h.prototype.ac;chrome.cast.media.h.prototype.queueSetRepeatMode=chrome.cast.media.h.prototype.cc;chrome.cast.media.h.prototype.queueJumpToItem=chrome.cast.media.h.prototype.Ub;chrome.cast.media.h.prototype.queueNext=chrome.cast.media.h.prototype.Xb;chrome.cast.media.h.prototype.queuePrev=chrome.cast.media.h.prototype.Yb;chrome.cast.media.h.prototype.queueUpdateItems=chrome.cast.media.h.prototype.dc;
|
||||
chrome.cast.media.h.prototype.queueAppendItem=chrome.cast.media.h.prototype.Sb;chrome.cast.media.h.prototype.queueInsertItems=chrome.cast.media.h.prototype.Tb;chrome.cast.media.h.prototype.editTracksInfo=chrome.cast.media.h.prototype.O;chrome.cast.media.h.prototype.setVolume=chrome.cast.media.h.prototype.R;chrome.cast.media.h.prototype.stop=chrome.cast.media.h.prototype.stop;chrome.cast.media.h.prototype.seek=chrome.cast.media.h.prototype.seek;chrome.cast.media.h.prototype.pause=chrome.cast.media.h.prototype.pause;
|
||||
chrome.cast.media.h.prototype.play=chrome.cast.media.h.prototype.play;chrome.cast.media.h.prototype.getStatus=chrome.cast.media.h.prototype.P;var Ha=function(a,b,c){this.sessionId=a;this.namespaceName=b;this.message=c};var Ia=function(a,b){this.type="SET_VOLUME";this.requestId=0;this.volume=a;this.expectedVolume=b||null};var Ja=function(a){this.type="STOP";this.requestId=0;this.sessionId=a||null};chrome.cast.j=function(a,b,c,d,e){this.sessionId=a;this.appId=b;this.displayName=c;this.statusText=null;this.appImages=d;this.receiver=e;this.senderApps=[];this.namespaces=[];this.media=[];this.status=chrome.cast.K.CONNECTED;this.transportId=""};f=chrome.cast.j.prototype;f.oc=function(a,b,c){var d=B;a=new Ia(new chrome.cast.Volume(a,null),this.receiver.volume);d.setReceiverVolume(this.sessionId,a,b,c)};
|
||||
f.nc=function(a,b,c){a=new Ia(new chrome.cast.Volume(null,a),this.receiver.volume);B.setReceiverVolume(this.sessionId,a,b,c)};f.getDialAppInfo=function(a,b){B.getDialAppInfo(a,b)};f.Ob=function(a,b){B.leaveSession(this.sessionId,a,b)};f.stop=function(a,b){B.Da(new Ja(this.sessionId),a,b,chrome.cast.timeout.stopSession)};f.sendMessage=function(a,b,c,d){B.kc(new Ha(this.sessionId,a,b),c,d)};f.Y=function(a){B.Ib(this.sessionId,a)};f.ba=function(a){B.jc(this.sessionId,a)};
|
||||
f.Hb=function(a,b){B.Fb(this.sessionId,a,b)};f.W=function(a){B.W(this.sessionId,a)};f.Z=function(a){B.Z(this.sessionId,a)};f.hc=function(a,b){B.ec(this.sessionId,a,b)};f.Pb=function(a,b,c){a.sessionId=this.sessionId;B.Ea(a,"LOAD",b,c)};f.Vb=function(a,b,c){a.sessionId=this.sessionId;B.Ea(a,"QUEUE_LOAD",b,c)};x("chrome.cast.Session",chrome.cast.j);chrome.cast.j.prototype.queueLoad=chrome.cast.j.prototype.Vb;chrome.cast.j.prototype.loadMedia=chrome.cast.j.prototype.Pb;
|
||||
chrome.cast.j.prototype.removeMessageListener=chrome.cast.j.prototype.hc;chrome.cast.j.prototype.removeMediaListener=chrome.cast.j.prototype.Z;chrome.cast.j.prototype.addMediaListener=chrome.cast.j.prototype.W;chrome.cast.j.prototype.addMessageListener=chrome.cast.j.prototype.Hb;chrome.cast.j.prototype.removeUpdateListener=chrome.cast.j.prototype.ba;chrome.cast.j.prototype.addUpdateListener=chrome.cast.j.prototype.Y;chrome.cast.j.prototype.sendMessage=chrome.cast.j.prototype.sendMessage;
|
||||
chrome.cast.j.prototype.stop=chrome.cast.j.prototype.stop;chrome.cast.j.prototype.leave=chrome.cast.j.prototype.Ob;chrome.cast.j.prototype.getDialAppInfo=chrome.cast.j.prototype.getDialAppInfo;chrome.cast.j.prototype.setReceiverMuted=chrome.cast.j.prototype.nc;chrome.cast.j.prototype.setReceiverVolumeLevel=chrome.cast.j.prototype.oc;var D=function(a,b){this.g=a[r.Symbol.iterator]();this.i=b};D.prototype[Symbol.iterator]=function(){return this};D.prototype.next=function(){var a=this.g.next();return{value:a.done?void 0:this.i.call(void 0,a.value),done:a.done}};var Ka=function(a,b){return new D(a,b)};var E=function(){};E.prototype.next=function(){return F};var F=Da({done:!0,value:void 0});E.prototype.o=function(){return this};var La=function(a){if(a instanceof E)return a;if(typeof a.o=="function")return a.o(!1);if(u(a)){var b=0,c=new E;c.next=function(){for(;;){if(b>=a.length)return F;if(b in a)return{value:a[b++],done:!1};b++}};return c}throw Error("Not implemented");},G=function(a,b){if(u(a))Ba(a,b);else for(a=La(a);;){var c=a.next();if(c.done)break;b.call(void 0,c.value,void 0,a)}};var Ma=function(a){if(a instanceof H||a instanceof I||a instanceof J)return a;if(typeof a.next=="function")return new H(function(){return a});if(typeof a[Symbol.iterator]=="function")return new H(function(){return a[Symbol.iterator]()});if(typeof a.o=="function")return new H(function(){return a.o()});throw Error("Not an iterator or iterable.");},H=function(a){this.g=a};H.prototype.o=function(){return new I(this.g())};H.prototype[Symbol.iterator]=function(){return new J(this.g())};H.prototype.i=function(){return new J(this.g())};
|
||||
var I=function(a){this.g=a};q(I,E);I.prototype.next=function(){return this.g.next()};I.prototype[Symbol.iterator]=function(){return new J(this.g)};I.prototype.i=function(){return new J(this.g)};var J=function(a){H.call(this,function(){return a});this.l=a};q(J,H);J.prototype.next=function(){return this.l.next()};var K=function(a,b){this.i={};this.g=[];this.l=this.size=0;var c=arguments.length;if(c>1){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a)if(a instanceof K)for(c=Na(a),d=0;d<c.length;d++)this.set(c[d],a.get(c[d]));else for(d in a)this.set(d,a[d])};K.prototype.L=function(){L(this);for(var a=[],b=0;b<this.g.length;b++)a.push(this.i[this.g[b]]);return a};var Na=function(a){L(a);return a.g.concat()};
|
||||
K.prototype.has=function(a){return M(this.i,a)};K.prototype.clear=function(){this.i={};this.l=this.size=this.g.length=0};K.prototype.remove=function(a){return this.delete(a)};K.prototype.delete=function(a){return M(this.i,a)?(delete this.i[a],--this.size,this.l++,this.g.length>2*this.size&&L(this),!0):!1};
|
||||
var L=function(a){if(a.size!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];M(a.i,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.size!=a.g.length){b={};for(d=c=0;c<a.g.length;){var e=a.g[c];M(b,e)||(a.g[d++]=e,b[e]=1);c++}a.g.length=d}};f=K.prototype;f.get=function(a,b){return M(this.i,a)?this.i[a]:b};f.set=function(a,b){M(this.i,a)||(this.size+=1,this.g.push(a),this.l++);this.i[a]=b};f.forEach=function(a,b){for(var c=Na(this),d=0;d<c.length;d++){var e=c[d],h=this.get(e);a.call(b,h,e,this)}};
|
||||
f.keys=function(){return Ma(this.o(!0)).i()};f.values=function(){return Ma(this.o(!1)).i()};f.entries=function(){var a=this;return Ka(this.keys(),function(b){return[b,a.get(b)]})};f.o=function(a){L(this);var b=0,c=this.l,d=this,e=new E;e.next=function(){if(c!=d.l)throw Error("The map has changed since the iterator was created");if(b>=d.g.length)return F;var h=d.g[b++];return{value:a?h:d.i[h],done:!1}};return e};var M=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var N=function(a,b){this.requestId=a;this.u=b;this.Ga=null};N.prototype.i=function(){};var Oa=function(){this.g=new K},Pa=function(a,b){a.g.set(b.requestId,b);b.Ga=setTimeout(function(){a.g.delete(b.requestId);b.i()},b.u)},Qa=function(a,b){var c=a.g.get(b);if(!c)return null;clearTimeout(c.Ga);a.g.delete(b);return c};var O=function(a,b,c,d){N.call(this,a,d||6E5);this.l=b;this.g=c};q(O,N);O.prototype.i=function(){this.g(new chrome.cast.Error(chrome.cast.A.TIMEOUT))};var P=function(a,b,c,d){this.type=a;this.message=b;this.sequenceNumber=c!==void 0?c:-1;this.timeoutMillis=d||0;this.clientId=""};var Q=function(a){this.l=a;this.i=String(Date.now())+String(Math.floor(Math.random()*1E5));this.g=null},Ra=function(a,b){if(!a.g)return"No active session";b.clientId=a.i;b=JSON.stringify(b);if(b.length>32768)return"Message length over limit";a.g.send(b);return null};Q.prototype.connect=function(a){this.g=a;this.g.onmessage=w(this.u,this);Ra(this,new P("client_connect",this.i))};Q.prototype.disconnect=function(){this.g.close();this.g=null};
|
||||
Q.prototype.u=function(a){a=JSON.parse(a.data);if(a.clientId==this.i)this.l.onMessage(a)};var Sa=function(a,b,c){this.l=a;this.i=b;this.g=c},Ta=function(a){var b="cast-dial:"+a.l,c=new URLSearchParams;a.i&&c.set("dialPostData",a.i);a.g&&c.set("clientId",a.g);(a=c.toString())&&(b+="?"+a);return b};var Ua=function(a,b,c,d,e,h,k,m,p,t){this.I=a;this.g=b||null;this.l=c||null;this.C=d||null;this.D=e!==void 0?e:null;this.i=h||null;this.H=k||null;this.J=m||!1;this.G=p?["WEB","ANDROID_TV"]:["WEB"];this.u=t||null},Va=function(a){var b=a.I.map(function(c){var d="cast:"+c.appId,e=new URLSearchParams;c.capabilities&&c.capabilities.length>0&&e.set("capabilities",c.capabilities.join(","));a.g&&e.set("clientId",a.g);a.l&&e.set("autoJoinPolicy",a.l);a.C&&e.set("defaultActionPolicy",a.C);a.D!=null&&e.set("launchTimeout",
|
||||
String(a.D));a.J&&e.set("invisibleSender","true");e.set("supportedAppTypes",a.G.join(","));c=e.set;var h=JSON,k=h.stringify,m={launchCheckerParams:{}};a.u&&(m.launchCheckerParams.credentialsData=a.u);c.call(e,"appParams",k.call(h,m));return d+"?"+e.toString()});a.i&&b.push(Ta(new Sa(a.i,a.H,a.g)));return b};var Wa=function(){this.g={};this.i={}},Xa=function(a,b,c){var d=a.g[b];return d?(d.status=c,d.media.forEach(function(e){delete a.i[e.sessionId+"#"+e.mediaSessionId]}),delete a.g[b],!0):!1},Za=function(a,b){var c=a.g[b.sessionId];if(c)return c.statusText=b.statusText,c.namespaces=b.namespaces||[],c.receiver.volume=b.receiver.volume,c;c=new chrome.cast.j(b.sessionId,b.appId,b.displayName,b.appImages,b.receiver);for(var d in b)d=="media"?c.media=b.media.map(function(e){e=Ya(a,e);e.u=!1;e.l=!0;return e}):
|
||||
b.hasOwnProperty(d)&&(c[d]=b[d]);return a.g[b.sessionId]=c},Ya=function(a,b){var c=b.sessionId+"#"+b.mediaSessionId,d=a.i[c];d||(d=new chrome.cast.media.h(b.sessionId,b.mediaSessionId),a.i[c]=d,(a=a.g[b.sessionId])&&a.media.push(d));a=d;a.currentItemId=null;a.loadingItemId=null;a.preloadedItemId=null;for(var e in b)e!="items"&&b.hasOwnProperty(e)&&(e=="volume"?(a.volume.level=b.volume.level,a.volume.muted=b.volume.muted):a[e]=b[e]);e=ka(["idleReason","extendedStatus","breakStatus"]);for(c=e.next();!c.done;c=
|
||||
e.next())c=c.value,b.hasOwnProperty(c)||(a[c]=null);"currentTime"in b&&(a.g=Date.now());if(a.playerState==chrome.cast.media.B.IDLE&&a.loadingItemId==null)a.currentItemId=null,a.loadingItemId=null,a.preloadedItemId=null,a.items=null;else if(b.hasOwnProperty("items")&&b.items){e=[];var h=a.items;c={};if(h)for(var k=0;k<h.length;k++)c[h[k].itemId]=k;b=ka(b.items);for(h=b.next();!h.done;h=b.next()){h=h.value;if(!h.media){k=h.itemId;var m=a.items?a.items[c[k]]:null;m&&m.media?h.media=m.media:k==a.currentItemId&&
|
||||
a.media&&(h.media=a.media)}k=e;m=k.push;var p=void 0,t=new chrome.cast.media.ta(h.media);for(p in h)h.hasOwnProperty(p)&&(t[p]=h[p]);m.call(k,t)}a.items=e}return d},$a=function(a,b){delete a.i[b.sessionId+"#"+b.mediaSessionId];if(a=a.g[b.sessionId])b=a.media.indexOf(b),b!=-1&&a.media.splice(b,1)};function R(){var a=r.navigator;return a&&(a=a.userAgent)?a:""};var ab=R().toLowerCase().indexOf("webkit")!=-1&&R().indexOf("Edge")==-1;var bb={},S=null,cb=R().indexOf("Gecko")!=-1&&!(R().toLowerCase().indexOf("webkit")!=-1&&R().indexOf("Edge")==-1)&&!(R().indexOf("Trident")!=-1||R().indexOf("MSIE")!=-1)&&R().indexOf("Edge")==-1||ab||typeof r.btoa=="function",db=function(a){if(cb)var b=r.btoa(a);else{b=[];for(var c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);if(e>255)throw Error("go/unicode-to-byte-error");b[c++]=e}a=void 0;a===void 0&&(a=0);if(!S)for(S={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),
|
||||
d=["+/=","+/","-_=","-_.","-_"],e=0;e<5;e++){var h=c.concat(d[e].split(""));bb[e]=h;for(var k=0;k<h.length;k++){var m=h[k];S[m]===void 0&&(S[m]=k)}}a=bb[a];c=Array(Math.floor(b.length/3));d=a[64]||"";for(e=h=0;h<b.length-2;h+=3){var p=b[h],t=b[h+1];m=b[h+2];k=a[p>>2];p=a[(p&3)<<4|t>>4];t=a[(t&15)<<2|m>>6];m=a[m&63];c[e++]=""+k+p+t+m}k=0;m=d;switch(b.length-h){case 2:k=b[h+1],m=a[(k&15)<<2]||d;case 1:b=b[h],c[e]=""+a[b>>2]+a[(b&3)<<4|k>>4]+m+d}b=c.join("")}return b};var eb=function(a){if(a.L&&typeof a.L=="function")return a.L();if(typeof Map!=="undefined"&&a instanceof Map||typeof Set!=="undefined"&&a instanceof Set)return Array.from(a.values());if(typeof a==="string")return a.split("");if(u(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}b=[];c=0;for(d in a)b[c++]=a[d];return b};var T=function(){this.g=new K;this.size=0},U=function(a){var b=typeof a;return b=="object"&&a||b=="function"?"o"+(Object.prototype.hasOwnProperty.call(a,v)&&a[v]||(a[v]=++la)):b.slice(0,1)+a};f=T.prototype;f.add=function(a){this.g.set(U(a),a);this.size=this.g.size};f.removeAll=function(a){a=eb(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c]);this.size=this.g.size};f.delete=function(a){a=this.g.remove(U(a));this.size=this.g.size;return a};f.remove=function(a){return this.delete(a)};
|
||||
f.clear=function(){this.g.clear();this.size=0};f.has=function(a){var b=this.g;a=U(a);return b.has(a)};f.contains=function(a){var b=this.g;a=U(a);return b.has(a)};f.L=function(){return this.g.L()};f.values=function(){return this.g.values()};f.o=function(){return this.g.o(!1)};T.prototype[Symbol.iterator]=function(){return this.values()};var V=function(){this.C=new Q(this);this.g=null;this.G=new Wa;this.i=0;this.S=new Oa;this.D=new K;this.u=new K;this.I=new K;this.J=[];this.Oa=this.Jb.bind(this);this.ia=this.H=this.l=null},fb=function(a){var b=new chrome.cast.Error(chrome.cast.A.INVALID_PARAMETER,"Already requesting session");a&&a(b)},W=function(a,b,c,d){c&&Pa(a.S,c);d!==void 0?b.sequenceNumber=d:(b.sequenceNumber=a.i,a.i=(a.i+1)%9007199254740992);d=Ra(a.C,b);c&&d&&(a=Qa(a.S,b.sequenceNumber))&&(a=a.g,d=new chrome.cast.Error(chrome.cast.A.INVALID_PARAMETER,
|
||||
d),a&&a(d))};
|
||||
V.prototype.initialize=function(a,b){var c=this;B=this;this.g=a;a.invisibleSender||(a=new PresentationRequest(X(this)),a.getAvailability().then(function(d){d.onchange=function(){c.g.receiverListener(d.value?chrome.cast.N.AVAILABLE:chrome.cast.N.UNAVAILABLE)};d.onchange()},function(){c.g.receiverListener(chrome.cast.N.AVAILABLE)}),a.onconnectionavailable=function(d){Y(c,d.connection)},this.ia=(r.navigator||null).presentation.defaultRequest=a,a.reconnect(chrome.cast.Ha).then(function(d){Y(c,d)},function(){}));
|
||||
b&&b(void 0)};V.prototype.da=function(a){a.navigator.presentation.defaultRequest=this.ia};var Y=function(a,b,c){c=c===void 0?null:c;b.onclose=function(d){a.l=null;switch(d.reason){case "closed":gb(a,chrome.cast.K.DISCONNECTED);break;case "error":if(c){d=c;var e=new chrome.cast.Error(chrome.cast.A.SESSION_ERROR);d&&d(e)}}};b.onterminate=function(){gb(a,chrome.cast.K.STOPPED)};b.state=="connected"?a.C.connect(b):b.onconnect=function(){a.C.connect(b)}};
|
||||
V.prototype.requestSession=function(a,b,c){var d=this;this.l?fb(b):(c=X(this,c),this.l=a,(new PresentationRequest(c)).start().then(function(e){Y(d,e,b)}).catch(function(e){d.l=null;e=new chrome.cast.Error(e.name=="AbortError"||e.name=="NotAllowedError"?chrome.cast.A.CANCEL:chrome.cast.A.SESSION_ERROR);b&&b(e)}))};
|
||||
var X=function(a,b){var c=null,d=null;b=b||a.g.sessionRequest;var e=b.dialRequest;e&&(c=e.appName,(d=e.launchParameter)&&!d.match(hb)&&(d=db(d)));var h=[];h.push({appId:b.appId,capabilities:b.capabilities});b||Ba(a.g.additionalSessionRequests,function(k){h.push({appId:k.appId,capabilities:k.capabilities})});return Va(new Ua(h,a.C.i,a.g.autoJoinPolicy,a.g.defaultActionPolicy,b.requestSessionTimeout,c,d,a.g.invisibleSender,b.androidReceiverCompatible,b.credentialsData))};
|
||||
V.prototype.Ea=function(a,b,c,d){ib(this,null,b,a,function(e){e.l=!0;c&&c(e)},function(e){d(e)},chrome.cast.media.timeout.load)};V.prototype.m=function(a,b,c,d,e,h){var k=this;ib(this,a,b,c,function(m){k.Ca(m);d&&d(void 0)},e,h)};var ib=function(a,b,c,d,e,h,k){d.type=c;b!=null&&(d.mediaSessionId=b.mediaSessionId,d.sessionId=b.sessionId);a.Da(d,function(m){m.status&&m.status.length==1?e&&e(m.status[0]):(m=new chrome.cast.Error(chrome.cast.A.SESSION_ERROR),h&&h(m))},h,k)};f=V.prototype;
|
||||
f.setReceiverVolume=function(a,b,c,d){b.sessionId=a;W(this,new P("v2_message",b,void 0,chrome.cast.timeout.setReceiverVolume),new O(this.i,c,d,chrome.cast.timeout.sendCustomMessage))};f.getDialAppInfo=function(a,b){W(this,new P("dial_app_info",void 0,void 0,chrome.cast.timeout.getDialAppInfo),new O(this.i,a,b,chrome.cast.timeout.sendCustomMessage))};f.ca=function(a){var b=this;(new PresentationRequest(X(this))).reconnect(chrome.cast.cb+a).then(function(c){Y(b,c)},function(){})};
|
||||
f.leaveSession=function(a,b,c){W(this,new P("leave_session",a,void 0,chrome.cast.timeout.leaveSession),new O(this.i,b,c,chrome.cast.timeout.leaveSession))};f.kc=function(a,b,c){W(this,new P("app_message",a,void 0,chrome.cast.timeout.sendCustomMessage),new O(this.i,b,c,chrome.cast.timeout.sendCustomMessage))};f.Da=function(a,b,c,d){W(this,new P("v2_message",a,void 0,d),new O(this.i,b,c,d))};var jb=function(a,b,c){var d=a.get(b);d||(d=new T,a.set(b,d));d.add(c)};f=V.prototype;
|
||||
f.Ib=function(a,b){jb(this.D,a,b)};f.jc=function(a,b){(a=this.D.get(a))&&a.remove(b)};f.X=function(a){this.J.push(a)};f.aa=function(a){a=this.J.indexOf(a);a>=0&&this.J.splice(a,1)};f.Fb=function(a,b,c){var d=this.u.get(a);d||(d=new K,this.u.set(a,d));a=d.get(b);a||(a=new T,d.set(b,a));a.add(c)};f.ec=function(a,b,c){(a=this.u.get(a))&&(b=a.get(b))&&b.remove(c)};f.W=function(a,b){jb(this.I,a,b)};f.Z=function(a,b){(a=this.I.get(a))&&a.remove(b)};f.Gb=function(a,b){a.i.indexOf(b)==-1&&a.i.push(b)};
|
||||
f.fc=function(a,b){b=a.i.indexOf(b);b!=-1&&a.i.splice(b,1)};f.Ca=function(a){if(a.l){var b=a.playerState!=chrome.cast.media.B.IDLE||a.loadingItemId!=null;a.i.forEach(function(d){d(b)});b||$a(this.G,a)}else{a.l=!0;var c=this.I.get(a.sessionId);c&&G(c.o(),function(d){d(a)})}};f.Jb=function(a){return Ya(this.G,a)};var gb=function(a,b){if(a.H){var c=a.H;a.H=null;a.C.disconnect();var d=b!=chrome.cast.K.STOPPED;Xa(a.G,c,b)&&(a.u.delete(c),a.I.delete(c),b=a.D.get(c))&&(a.D.delete(c),G(b.o(),function(e){e(d)}))}};
|
||||
V.prototype.onMessage=function(a){switch(a.type){case "new_session":case "update_session":a.message=Za(this.G,a.message);break;case "v2_message":var b=a.message;b&&b.type=="MEDIA_STATUS"&&b.status&&(b.status=b.status.map(this.Oa))}if(b=Qa(this.S,a.sequenceNumber))a.type=="error"?(b=b.g)&&b(a.message):(b=b.l)&&b(a.message);if(b=a.message)switch(a.type){case "receiver_action":kb(this,b);break;case "new_session":this.H=b.sessionId;this.l?(this.l(b),this.l=null):this.g&&this.g.sessionListener(b);break;
|
||||
case "update_session":lb(this,b);break;case "app_message":mb(this,b);break;case "v2_message":b.type=="MEDIA_STATUS"&&b.status.forEach(this.Ca.bind(this));break;case "custom_dial_launch":nb(this,a.sequenceNumber,b)}};
|
||||
var lb=function(a,b){(a=a.D.get(b.sessionId))&&G(a.o(),function(c){c(!0)})},kb=function(a,b){a.J.forEach(function(c){c(b.receiver,b.action)})},mb=function(a,b){(a=a.u.get(b.sessionId))&&(a=a.get(b.namespaceName))&&G(a.o(),function(c){c(b.namespaceName,b.message)})},ob=function(a,b,c){W(a,new P("custom_dial_launch",c,void 0,chrome.cast.timeout.sendCustomMessage),null,b)},nb=function(a,b,c){a.g.customDialLaunchCallback?a.g.customDialLaunchCallback(c).then(function(d){ob(a,b,d)},function(){ob(a,b)}):
|
||||
ob(a,b)},hb=RegExp("^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$"),Z=new V;chrome.cast.initialize=function(a,b,c){Z.initialize(a,b,c)};x("chrome.cast.initialize",chrome.cast.initialize);chrome.cast.da=function(a){Z.da(a)};x("chrome.cast.setPageContext",chrome.cast.da);chrome.cast.requestSession=function(a,b,c){Z.requestSession(a,b,c)};x("chrome.cast.requestSession",chrome.cast.requestSession);chrome.cast.Rb=function(){};x("chrome.cast.precache",chrome.cast.Rb);chrome.cast.ca=function(a){Z.ca(a)};x("chrome.cast.requestSessionById",chrome.cast.ca);chrome.cast.X=function(a){Z.X(a)};
|
||||
x("chrome.cast.addReceiverActionListener",chrome.cast.X);chrome.cast.aa=function(a){Z.aa(a)};x("chrome.cast.removeReceiverActionListener",chrome.cast.aa);chrome.cast.Qb=function(){};x("chrome.cast.logMessage",chrome.cast.Qb);chrome.cast.lc=function(a,b){b()};x("chrome.cast.setCustomReceivers",chrome.cast.lc);chrome.cast.mc=function(a,b){b()};x("chrome.cast.setReceiverDisplayStatus",chrome.cast.mc);chrome.cast.unescape=function(a){return a.indexOf("&")!=-1?"document"in r?Fa(a):Ga(a):a};
|
||||
x("chrome.cast.unescape",chrome.cast.unescape);chrome.cast.isAvailable=!1;x("chrome.cast.isAvailable",chrome.cast.isAvailable);chrome.cast.Fa=!1;chrome.cast.ea=function(){if(!chrome.cast.Fa){chrome.cast.Fa=!0;chrome.cast.isAvailable=!0;var a=window.__onGCastApiAvailable;a&&typeof a=="function"&&a(!0)}};document.readyState=="complete"?chrome.cast.ea():(window.addEventListener("load",chrome.cast.ea,!1),window.addEventListener("DOMContentLoaded",chrome.cast.ea,!1));}).call(this);
|
||||
@@ -0,0 +1,12 @@
|
||||
(function(){/*
|
||||
|
||||
Copyright The Closure Library Authors.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
'use strict';var l=function(){var a=h,b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},m=this||self,n=/^[\w+/_-]+[=]{0,2}$/,p=null,q=function(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&n.test(a)?a:""},r=function(a,b){function e(){}e.prototype=b.prototype;a.i=b.prototype;a.prototype=new e;a.prototype.constructor=a;a.h=function(c,g,k){for(var f=Array(arguments.length-2),d=2;d<arguments.length;d++)f[d-2]=arguments[d];
|
||||
return b.prototype[g].apply(c,f)}},t=function(a){return a};function u(a){if(Error.captureStackTrace)Error.captureStackTrace(this,u);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}r(u,Error);u.prototype.name="CustomError";var v=function(a,b){a=a.split("%s");for(var e="",c=a.length-1,g=0;g<c;g++)e+=a[g]+(g<b.length?b[g]:"%s");u.call(this,e+a[c])};r(v,u);v.prototype.name="AssertionError";var w=function(a,b){throw new v("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var x;var A=function(a,b){this.g=b===z?a:""};A.prototype.toString=function(){return this.g+""};var z={};var B=function(){var a=window.navigator.userAgent.match(/Chrome\/([0-9]+)/);return a?parseInt(a[1],10):0},C=function(a){return!!document.currentScript&&(-1!=document.currentScript.src.indexOf("?"+a)||-1!=document.currentScript.src.indexOf("&"+a))},D=function(){return"function"==typeof window.__onGCastApiAvailable?window.__onGCastApiAvailable:null},F=function(a){a.length?E(a.shift(),function(){F(a)}):G()},H=function(a){return"chrome-extension://"+a+"/cast_sender.js"},E=function(a,b,e){var c=document.createElement("script");
|
||||
c.onerror=b;e&&(c.onload=e);if(void 0===x)if(b=null,(e=m.trustedTypes)&&e.createPolicy){try{b=e.createPolicy("goog#html",{createHTML:t,createScript:t,createScriptURL:t})}catch(y){m.console&&m.console.error(y.message)}x=b}else x=b;a=(b=x)?b.createScriptURL(a):a;a=new A(a,z);a:{try{var g=c&&c.ownerDocument,k=g&&(g.defaultView||g.parentWindow);k=k||m;if(k.Element&&k.Location){var f=k;break a}}catch(y){}f=null}if(f&&"undefined"!=typeof f.HTMLScriptElement&&(!c||!(c instanceof f.HTMLScriptElement)&&(c instanceof
|
||||
f.Location||c instanceof f.Element))){f=typeof c;if("object"==f&&null!=c||"function"==f)try{var d=c.constructor.displayName||c.constructor.name||Object.prototype.toString.call(c)}catch(y){d="<object could not be stringified>"}else d=void 0===c?"undefined":null===c?"null":typeof c;w("Argument is not a %s (or a non-Element, non-Location mock); got: %s","HTMLScriptElement",d)}a instanceof A&&a.constructor===A?d=a.g:(d=typeof a,w("expected object of type TrustedResourceUrl, got '"+a+"' of type "+("object"!=
|
||||
d?d:a?Array.isArray(a)?"array":d:"null")),d="type_error:TrustedResourceUrl");c.src=d;(d=c.ownerDocument&&c.ownerDocument.defaultView)&&d!=m?d=q(d.document):(null===p&&(p=q(m.document)),d=p);d&&c.setAttribute("nonce",d);(document.head||document.documentElement).appendChild(c)},I=function(){var a=B(),b=[];if(1<a){var e=a-1;b.push("//www.gstatic.com/eureka/clank/"+a+"/cast_sender.js");b.push("//www.gstatic.com/eureka/clank/"+e+"/cast_sender.js")}return b},G=function(){var a=D();a&&a(!1,"No cast extension found")},
|
||||
K=function(){if(J){var a=2,b=D(),e=function(){a--;0==a&&b&&b(!0)};window.__onGCastApiAvailable=e;E("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",G,e)}},J=C("loadCastFramework")||C("loadCastApplicationFramework"),L=["pkedcjkdefgpdelpbcmbmeomcjbeemfm","enhhojjnijigcajfphajepfemndkmdlo"];if(0<=window.navigator.userAgent.indexOf("Android")&&0<=window.navigator.userAgent.indexOf("Chrome/")&&window.navigator.presentation){if(60<=B()){K();var M=I();M.push("//www.gstatic.com/eureka/clank/cast_sender.js");F(M)}}else if(!window.chrome||!window.navigator.presentation||0<=window.navigator.userAgent.indexOf("Edge"))G();else if(89<=B()){K();var N=I(),O=N.push,P=O.apply,h=L.map(H),Q;if(h instanceof Array)Q=h;else{var R,S="undefined"!=typeof Symbol&&Symbol.iterator&&h[Symbol.iterator];R=S?S.call(h):
|
||||
{next:l()};for(var T,U=[];!(T=R.next()).done;)U.push(T.value);Q=U}P.call(O,N,Q);N.push("//www.gstatic.com/eureka/clank/cast_sender.js");F(N)}else K(),F(L.map(H));}).call(this);
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="14" height="11" viewBox="0 0 14 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.40014 10.2952L0.854126 5.74924L1.99063 4.61273L5.40014 8.02224L12.7176 0.704758L13.8541 1.84126L5.40014 10.2952Z" fill="#55BC62"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 246 B |
@@ -0,0 +1,622 @@
|
||||
function UserNotifications() {
|
||||
"use strict"
|
||||
var self = this;
|
||||
self.totalScrollHeight = 0;
|
||||
self.topNotif = 0;
|
||||
self.offSss = false;
|
||||
self._tipTimeout = false;
|
||||
self.notifBoxHtml;
|
||||
self.audio = 1;
|
||||
self.undelivN = 0;
|
||||
self.HTTP_ENDPOINT = "/checkN.php";
|
||||
|
||||
self.startIntervals();
|
||||
}
|
||||
|
||||
UserNotifications.prototype.startIntervals = function () {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var intervals = BidooCnf.intervals.user.notifications;
|
||||
self.pingNotification();
|
||||
setInterval(self.bidping.bind(self, getBidsBonus()), intervals.bidping);
|
||||
setInterval(self.updateNotificationsDateTime.bind(self), intervals.updateNotificationsDateTime);
|
||||
setInterval(self.pingNotification.bind(self), intervals.pingNotification);
|
||||
setInterval(self.updateAuctionsWon.bind(self), intervals.auctionsWon); // [GR] for update badge number for auctions won to pay by user
|
||||
}
|
||||
|
||||
UserNotifications.prototype.updateNotificationsDateTime = function () {
|
||||
"use strict"
|
||||
var self = this;
|
||||
moment.locale('it');
|
||||
self.getCorrectNotifSelector().find("abbr").each(function () {
|
||||
var abbrTime = parseInt($(this).data("utime"), 10);
|
||||
var newTime = parseInt((new Date()).getTime() / 1000, 10);
|
||||
var moment_abbr_time = moment(abbrTime, "X");
|
||||
var shouldBeFromNow = (newTime - abbrTime) < 21600;
|
||||
$(this).data("alt", moment().format());
|
||||
$(this).text(shouldBeFromNow ? moment_abbr_time.fromNow() : moment_abbr_time.calendar());
|
||||
});
|
||||
};
|
||||
|
||||
UserNotifications.prototype.updateAuctionsWon = function () { // [GR] for update badge number for auctions won to pay by user
|
||||
"use strict"
|
||||
$.get("/check_auctions_won.php", function (data) {
|
||||
if (self.offSss) {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
$(".navbar-fixed-bottom #bottomAuctionsWonToPay").html(data);
|
||||
$(".myBidooDesk #bottomAuctionsWonToPay").html(data);
|
||||
$(".myBidooMobile #bottomAuctionsWonToPay").html(data);
|
||||
$("#testataAuctionsWonToPay").html(data);
|
||||
if (parseInt(data) > 0) {
|
||||
$("#bottomAuctionsWonToPay").css("visibility", "visible");
|
||||
$("#testataAuctionsWonToPay").css("visibility", "visible");
|
||||
} else {
|
||||
$("#bottomAuctionsWonToPay").css("visibility", "hidden");
|
||||
$("#testataAuctionsWonToPay").css("visibility", "hidden");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
UserNotifications.prototype.bidping = function (bonus) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
$.get("/bidping.php", function (data) {
|
||||
if (self.offSss) {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
var progressValue = data[0] + "/" + data[1];
|
||||
$("#seven_7").html(progressValue);
|
||||
$(".bid-challenge [data-spot=0]")
|
||||
.html(progressValue)
|
||||
.parent()
|
||||
.attr("data-progress", progressValue);
|
||||
$(".leader-btn .progress-bar-success").css("width", ((data[0] / data[1]) * 100.00).toFixed(2) + "%");
|
||||
if (data[0] >= data[1] && data[2] < data[1]) {
|
||||
$('.bid-challenge .img-lock-open').hide();
|
||||
$('.bid-challenge .img-lock').show();
|
||||
$('#auctionBidBottomBar .wrap-progress').hide();
|
||||
$('#auctionBidBottomBar .wrap-button-get-bonus').show();
|
||||
|
||||
}
|
||||
|
||||
if (data[0] >= data[1] && (typeof getCookie('won') == "undefined")) {
|
||||
var expireWonDate = new Date();
|
||||
expireWonDate.setTime(getTimeFrames());
|
||||
self.wonChallenge(data[0], bonus);
|
||||
setValueCookie("won", 1, expireWonDate);
|
||||
}
|
||||
}).fail(function (jqXHR, textStatus, error) {
|
||||
if (jqXHR.status == 403) {
|
||||
self.offSss = true;
|
||||
$(".btn.leader-btn[data-target=#leader]")
|
||||
.html(getSessionExpired(true))
|
||||
.attr('data-toggle', null)
|
||||
.attr('data-target', null)
|
||||
.off("click").on({
|
||||
click: showLogin
|
||||
});
|
||||
}
|
||||
});
|
||||
self.bidPingProduct();
|
||||
}
|
||||
|
||||
UserNotifications.prototype.bidPingProduct = function () {
|
||||
"use strict"
|
||||
$.get("/bidping_product.php", function (data) {
|
||||
if (self.offSss) {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
$(".bid-challenge-product").html(data);
|
||||
});
|
||||
}
|
||||
|
||||
UserNotifications.prototype.getCallTipMsg = function (credits, bonus) {
|
||||
"use strict"
|
||||
var html = [
|
||||
"<div class='wrap'>",
|
||||
"<div>",
|
||||
"<img src='/images/razzo.svg'>",
|
||||
"</div>",
|
||||
"<div>",
|
||||
"<strong>Complimenti!</strong>",
|
||||
"<div>Hai Vinto " + credits + " Aste di Puntate</div>",
|
||||
"</div>",
|
||||
"</div>"
|
||||
];
|
||||
return html.join("");
|
||||
}
|
||||
|
||||
UserNotifications.prototype.callTip = function (credits, bonus, callback) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var tooltipReach = $(".tooltip.reach");
|
||||
$(".leader-btn")
|
||||
.tooltip('destroy').tooltip({
|
||||
html: true,
|
||||
placement: 'top',
|
||||
title: self.getCallTipMsg(credits, bonus),
|
||||
trigger: 'manual',
|
||||
animation: false,
|
||||
template: '<div class="tooltip reach" role="tooltip"><div class="tooltip-inner"></div></div>'
|
||||
})
|
||||
.tooltip("show");
|
||||
|
||||
tooltipReach.removeClass("bounceOutDown");
|
||||
if (self._tipTimeout)
|
||||
clearTimeout(self._tipTimeout);
|
||||
self._tipTimeout = setTimeout(function () {
|
||||
callback();
|
||||
}, 10000);
|
||||
}
|
||||
|
||||
UserNotifications.prototype.wonChallenge = function (nAuctions, bonus) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var selector = $(".leader-btn > div.bid-challenge");
|
||||
if (!selector.hasClass("achieved")) {
|
||||
self.callTip(nAuctions, bonus);
|
||||
}
|
||||
}
|
||||
|
||||
UserNotifications.prototype.pingNotification = function () {
|
||||
"use strict"
|
||||
var self = this;
|
||||
$.get(self.HTTP_ENDPOINT, {_t: 1}, function (r) {
|
||||
if (r.count > 0) {
|
||||
$(".bubble_desktop, .bubble_mobile, .toggle_bar_mobile").html(r.count).show();
|
||||
if ($("#notifBox").is(":visible") || $("#notifBoxMobile").is(":visible")) {
|
||||
self.loadNotification(true);
|
||||
}
|
||||
if (typeof r.undeliv != "undefined" && (Object.keys(r.undeliv).length > 0 && self.undelivN != Object.keys(r.undeliv).length)) {
|
||||
var audioCookie = getCookie('audioN');
|
||||
if (self.audio && ("undefined" == typeof audioCookie || audioCookie < r.count)) {
|
||||
self
|
||||
.playSound(r.audio)
|
||||
.then(setCookieMinutes.bind(null, 'audioN', r.count, 5))
|
||||
.catch(function () {
|
||||
$(document)
|
||||
.off('touchstart click')
|
||||
.on('touchstart click', function () {
|
||||
self.playSound(r.audio);
|
||||
$(document).off('touchstart click');
|
||||
});
|
||||
});
|
||||
}
|
||||
self.undelivN = Object.keys(r.undeliv).length;
|
||||
}
|
||||
} else {
|
||||
delCookie('audioN');
|
||||
$(".bubble_desktop, .bubble_mobile").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
UserNotifications.prototype.playSound = function (audioSrc) {
|
||||
"use strict"
|
||||
var audio = $("#push");
|
||||
if (audio.length)
|
||||
audio.remove();
|
||||
var aSound = document.createElement('audio');
|
||||
aSound.id = 'push';
|
||||
aSound.setAttribute('src', audioSrc + "?chk=" + (new Date()).getTime());
|
||||
return aSound.play();
|
||||
}
|
||||
|
||||
UserNotifications.prototype.toggleAudio = function (audioSetting) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var isNotArgPassed = "undefined" == typeof audioSetting;
|
||||
var snd = self.getCorrectNotifSelector().find(".sAudio");
|
||||
var snData = !!(isNotArgPassed ? parseInt(snd.attr("data-audio")) : audioSetting);
|
||||
snd.attr("data-audio", (!snData | 0))
|
||||
.toggleClass("disabled glyphicon-volume-off", !snData)
|
||||
.toggleClass("enabled glyphicon-volume-up", snData);
|
||||
if (isNotArgPassed)
|
||||
$.get(self.HTTP_ENDPOINT, {_s: (snData | 0)});
|
||||
}
|
||||
|
||||
UserNotifications.prototype.loadSettings = function (shouldSetCheckOptions) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
$.get(self.HTTP_ENDPOINT, {_load: 0}, function (settings) {
|
||||
self.audio = settings.audio;
|
||||
self.toggleAudio(self.audio);
|
||||
if (shouldSetCheckOptions) {
|
||||
$("#ticketMail").prop("checked", !!+settings["1"]);
|
||||
$("#creditMail").prop("checked", !!+settings["2"]);
|
||||
$("#packageMail").prop("checked", !!+settings["3"]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
UserNotifications.prototype.cleanData = function (dirtyString) {
|
||||
"use strict"
|
||||
dirtyString = dirtyString.replace(/&/g, "&");
|
||||
dirtyString = dirtyString.replace(/>/g, ">");
|
||||
dirtyString = dirtyString.replace(/</g, "<");
|
||||
dirtyString = dirtyString.replace(/"/g, "\"");
|
||||
dirtyString = dirtyString.replace("</i>", "</i><p class='paragraph-notification'>");
|
||||
dirtyString = dirtyString.replace("</a>", "</p></a>");
|
||||
dirtyString = dirtyString.replace("data-href", "data-mobile-fullscreen='true' data-no-padding-modal-body='true' data-href");
|
||||
dirtyString = dirtyString.replace("//it.bidoo.com", "");
|
||||
return dirtyString;
|
||||
}
|
||||
|
||||
UserNotifications.prototype.getNotificationItem = function (data) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var flag = parseInt(data.readFlag, 10);
|
||||
var classNotif = 2 == flag ? "class='read wrap-notif'" : (1 == flag ? "class='deliv wrap-notif'" : "");
|
||||
var item = [
|
||||
"<li id='notification_" + data.id + "' data-type='" + data.type + "' " + classNotif + ">",
|
||||
"<div class='notif-sx'>"+self.cleanData(data.content)+"</div>",
|
||||
"<div class='notif-dx'><abbr data-utime='" + data.created_at + "'></abbr>",
|
||||
"<i class='fa fa-clock-o clock-notification' aria-hidden='true'></i></div>",
|
||||
"</li>"
|
||||
];
|
||||
return item.join("");
|
||||
}
|
||||
|
||||
UserNotifications.prototype.getEmptyNotifications = function () {
|
||||
"use strict"
|
||||
var notif = [
|
||||
'<li class="text-center empty-notification">',
|
||||
'<p>Non hai alcuna notifica.</p>',
|
||||
'</li>'
|
||||
];
|
||||
return notif.join("");
|
||||
}
|
||||
|
||||
UserNotifications.prototype._renderN = function (data, more) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var list = [];
|
||||
var selector = this.getCorrectNotifSelector().find("ul");
|
||||
if (data.length) {
|
||||
$.each(data, function (i, item) {
|
||||
if ("object" == typeof item) {
|
||||
selector.append(self.getNotificationItem(item));
|
||||
if (parseInt(item.readFlag, 10) < 2 && item.type != '1') {
|
||||
list.push(item.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
self.updateNotificationsDateTime();
|
||||
} else {
|
||||
if (more === undefined || more === false) {
|
||||
selector.append(self.getEmptyNotifications());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
UserNotifications.prototype._renderFoot = function (shouldLoadMore, paging) {
|
||||
"use strict"
|
||||
|
||||
var loader = [
|
||||
"<a href='javascript:void(0)' onclick='BidooCnf.instances.user.notifications.loadMore(" + paging + ");' class='load-more load-more-notif'>",
|
||||
"Vedi altre",
|
||||
"</a>"
|
||||
].join("");
|
||||
var footer = [
|
||||
"<div class='whatelse nFoot text-center' id='more'>",
|
||||
shouldLoadMore ? loader : "",
|
||||
"</div>"
|
||||
];
|
||||
return footer.join("");
|
||||
}
|
||||
|
||||
UserNotifications.prototype.loadMore = function (id) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
$.get(self.HTTP_ENDPOINT, {f: id, m: 5}, function (r) {
|
||||
var selector = self.getCorrectNotifSelector();
|
||||
var listNotif = selector.find("ul");
|
||||
selector.find(".whatelse").remove();
|
||||
if (Object.keys(r.elements).length > 0) {
|
||||
var list = self._renderN(r.elements, true);
|
||||
var welse = self._renderFoot(r.shexc, r.elements[Object.keys(r.elements).length - 1].id);
|
||||
listNotif.append(welse);
|
||||
if (listNotif.height() <= selector.find("#notifBoxContainer").height()) {
|
||||
//selector.find("#more").find("a").click();
|
||||
}
|
||||
}
|
||||
if (typeof list != "undefined" && list.length > 0) {
|
||||
self.sendReadReq(list);
|
||||
}
|
||||
self.loadCustomScrollbar();
|
||||
return false;
|
||||
});
|
||||
return false;
|
||||
}
|
||||
$("body").click(function (event) {
|
||||
window.elementSelected = event.target.classList[0];
|
||||
if ($('.bidooBell').hasClass('active')) {
|
||||
$('.bidooBell').removeClass('active');
|
||||
} else {
|
||||
$('.bidooBell').addClass('active');
|
||||
}
|
||||
});
|
||||
UserNotifications.prototype.loadNotification = function (forceFetchNotif) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var isMobile = $(window).width() <= 991;
|
||||
var selector = self.getCorrectNotifSelector();
|
||||
self.topNotif = 0;
|
||||
if (selector.is(":visible") && !forceFetchNotif) {
|
||||
stopBodyScroll(false);
|
||||
if (window.elementSelected == "bidooBell") {
|
||||
selector.hide();
|
||||
$("#tickNotif").hide();
|
||||
}
|
||||
if (isMobile) {
|
||||
$('#notifBoxMobile').hide();
|
||||
$('#menuModal #btn-1 span').addClass('fa-plus');
|
||||
$('#menuModal #btn-1 span').removeClass('fa-minus');
|
||||
$('#menuModal #submenu1').css('display', 'none');
|
||||
}
|
||||
self.totalScrollHeight = 0;
|
||||
} else {
|
||||
selector.empty().show();
|
||||
if (isMobile)
|
||||
self.hideModalHeaderNotifications(true);
|
||||
self.composeNotificationsUI(isMobile, function (jqXHR, textStatus, errorThrown) {
|
||||
var isError = jqXHR && textStatus && errorThrown;
|
||||
if (!isError) {
|
||||
self.loadCustomScrollbar();
|
||||
$("#notifBox").show(); // [GR] ADD
|
||||
if (isMobile) {
|
||||
var titleSelector = selector.find(".nTitle");
|
||||
var realHeightNotificationShade = (titleSelector.height() + parseInt(titleSelector.css("padding-top")));
|
||||
var heightNotifDialog = ($(window).height() - realHeightNotificationShade);
|
||||
selector.find("#notifBoxContainer").css("height", "auto");
|
||||
selector.find("#more").find("a").click();
|
||||
}
|
||||
}
|
||||
$("#tickNotif").show();
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
UserNotifications.prototype.getNotificationsStructure = function (mobile, isFirstLoadNotifications, isSettings) {
|
||||
"use strict"
|
||||
var arrow_left = [
|
||||
'<a href="javascript:void();" onclick="BidooCnf.instances.user.notifications.back();" id="arrow_left">',
|
||||
'<img src="images/arrow-left.png" width="12">',
|
||||
'</a>'
|
||||
].join("");
|
||||
var structure = [
|
||||
'<div class="nTitle">',
|
||||
mobile || isSettings ? arrow_left : "",
|
||||
'<p style="display: inline-block;">' + (isSettings ? "Impostazioni" : "Notifiche") + '</p>',
|
||||
'<span class="sAudio glyphicon glyphicon-volume-up" onclick="BidooCnf.instances.user.notifications.toggleAudio();"></span>',
|
||||
'<span class="sNotif glyphicon glyphicon-cog" onclick="BidooCnf.instances.user.notifications.toggleSettings();"></span>',
|
||||
'</div>',
|
||||
'<div id="notifBoxContainer">',
|
||||
isFirstLoadNotifications ? "<img src='/images/loader_card.gif' class='loader-notifications'>" : "",
|
||||
'<ul class="not"></ul>',
|
||||
'</div>'
|
||||
]
|
||||
return structure.join("");
|
||||
}
|
||||
|
||||
UserNotifications.prototype.composeNotificationsUI = function (mobile, callback) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var selector = self.getCorrectNotifSelector();
|
||||
selector.html(self.getNotificationsStructure(mobile, true));
|
||||
$.get(self.HTTP_ENDPOINT, function (r) {
|
||||
$(".bubble_desktop, .bubble_mobile, .toggle_bar_mobile").hide();
|
||||
self.delivReadReq();
|
||||
var mobile = $(window).width() <= 991;
|
||||
var selectorList = selector.find("ul");
|
||||
selector.find(".loader-notifications").remove();
|
||||
if (r !== null) {
|
||||
var list = self._renderN(r.elements);
|
||||
if (Object.keys(r.elements).length > 0) {
|
||||
var footer = self._renderFoot(r.shexc, r.elements[Object.keys(r.elements).length - 1].id);
|
||||
selectorList.append(footer);
|
||||
}
|
||||
if (typeof list != "undefined" && list.length > 0) {
|
||||
self.sendReadReq(list);
|
||||
}
|
||||
self.loadSettings();
|
||||
} else {
|
||||
selectorList.html(getSessionExpired());
|
||||
}
|
||||
callback();
|
||||
}).fail(callback);
|
||||
}
|
||||
|
||||
UserNotifications.prototype.sendReadReq = function (list) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
if (typeof list !== undefined && list.length > 0) {
|
||||
$.get(self.HTTP_ENDPOINT, {_r: 1, l: list.join(',')});
|
||||
}
|
||||
}
|
||||
|
||||
UserNotifications.prototype.delivReadReq = function () {
|
||||
"use strict"
|
||||
$.get(this.HTTP_ENDPOINT, {_d: 1});
|
||||
}
|
||||
|
||||
UserNotifications.prototype.getSettings = function () {
|
||||
"use strict"
|
||||
var html = [
|
||||
'<div class="settingBox">',
|
||||
'<form role="form" style="opacity: 1;">',
|
||||
'<div class="title-settings"><b>Notifiche Email</b></div>',
|
||||
'<div class="checkbox">',
|
||||
'<label for="ticketMail">',
|
||||
'<input type="checkbox" name="ticketMail" id="ticketMail">',
|
||||
'<span class="notif-settings-label">Ricevi email per nuovi Ticket</span>',
|
||||
'</label>',
|
||||
'</div>',
|
||||
'<div class="checkbox">',
|
||||
'<label for="packageMail">',
|
||||
'<input type="checkbox" name="packageMail" id="packageMail">',
|
||||
'<span class="notif-settings-label">Ricevi Email per aggiornamenti spedizione</span>',
|
||||
'</label>',
|
||||
'</div>',
|
||||
'<div class="checkbox">',
|
||||
'<label for="creditMail">',
|
||||
'<input type="checkbox" name="creditMail" id="creditMail">',
|
||||
'<span class="notif-settings-label">Ricevi Email per accrediti di Puntate Gratis</span>',
|
||||
'</label>',
|
||||
'</div>',
|
||||
'<a class="btn btn-block btn-primary" href="javascript:void(0);" onclick="BidooCnf.instances.user.notifications.saveSettings();"><b>Salva Impostazioni</b></a>',
|
||||
'</form>',
|
||||
'</div>'
|
||||
];
|
||||
return html.join("");
|
||||
}
|
||||
|
||||
UserNotifications.prototype.showSettingNotification = function () {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var selector = self.getCorrectNotifSelector();
|
||||
if (selector.length) {
|
||||
self.notifBoxHtml = selector.html();
|
||||
selector.html(self.getNotificationsStructure(true, false, true))
|
||||
.find("#notifBoxContainer")
|
||||
.append(self.getSettings());
|
||||
self.loadSettings(true);
|
||||
document.querySelector('#notifBoxMobile #notifBoxContainer .not').remove();
|
||||
}
|
||||
}
|
||||
|
||||
UserNotifications.prototype.back = function () {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var selector = self.getCorrectNotifSelector();
|
||||
if ($(window).width() <= 991 && !selector.find(".settingBox").length) {
|
||||
self.hideModalHeaderNotifications(false);
|
||||
backMobile();
|
||||
return;
|
||||
}
|
||||
selector.html(self.notifBoxHtml);
|
||||
self.loadCustomScrollbar(true);
|
||||
}
|
||||
|
||||
UserNotifications.prototype.toggleSettings = function () {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var selector = self.getCorrectNotifSelector();
|
||||
if (!selector.is(":visible")) {
|
||||
selector.show();
|
||||
self.loadNotification();
|
||||
} else {
|
||||
self.showSettingNotification();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
UserNotifications.prototype.saveSettings = function () {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var mail = +$("#ticketMail").is(":checked");
|
||||
var pack = +$("#packageMail").is(":checked");
|
||||
var accr = +$("#creditMail").is(":checked");
|
||||
var data = [
|
||||
'm', mail,
|
||||
'p', pack,
|
||||
'a', accr
|
||||
];
|
||||
$.get(self.HTTP_ENDPOINT, {_set: data.join("|")}, function () {
|
||||
self.back();
|
||||
});
|
||||
}
|
||||
|
||||
UserNotifications.prototype.loadCustomScrollbar = function (forceReload) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var notif_box_selector = self.getCorrectNotifSelector().find("#notifBoxContainer");
|
||||
|
||||
if ($(window).width() <= 991) {
|
||||
notif_box_selector.off("scroll").scroll(function () {
|
||||
if ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
|
||||
self.topNotif = $(this).scrollTop();
|
||||
//notif_box_selector.find("#more").find("a").click();
|
||||
}
|
||||
});
|
||||
notif_box_selector.scrollTop(self.topNotif);
|
||||
} else if (forceReload || !notif_box_selector.hasClass("mCustomScrollbar")) {
|
||||
if (forceReload) {
|
||||
var list = notif_box_selector.find("ul").clone();
|
||||
notif_box_selector.empty().append(list);
|
||||
self.totalScrollHeight = 0;
|
||||
}
|
||||
notif_box_selector.mCustomScrollbar({
|
||||
documentTouchScroll: true,
|
||||
contentTouchScroll: 1,
|
||||
callbacks: {
|
||||
onTotalScroll: function () {
|
||||
var more_notif_selector = notif_box_selector.find("#more");
|
||||
if (more_notif_selector.is(":visible") && more_notif_selector.children().length) {
|
||||
// more_notif_selector.find("a").click();
|
||||
self.totalScrollHeight += 5 * 70;
|
||||
}
|
||||
},
|
||||
onInit: function () {
|
||||
if (self.totalScrollHeight != 0) {
|
||||
notif_box_selector.mCustomScrollbar("scrollTo", self.totalScrollHeight, {
|
||||
scrollInertia: 0
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
notif_box_selector
|
||||
.off("mouseover")
|
||||
.mouseover(true, stopBodyScroll)
|
||||
.off("mouseout")
|
||||
.mouseout(false, stopBodyScroll);
|
||||
bindModalCall("#notifBoxContainer", true);
|
||||
}
|
||||
|
||||
UserNotifications.prototype.getCorrectNotifSelector = function () {
|
||||
"use strict"
|
||||
var notifMobile = $("#notifBoxMobile");
|
||||
return $(window).width() <= 991 ? notifMobile : $("#notifBox");
|
||||
}
|
||||
|
||||
UserNotifications.prototype.hideModalHeaderNotifications = function (shouldHide) {
|
||||
"use strict"
|
||||
var self = this;
|
||||
self.getCorrectNotifSelector().parent()
|
||||
.parent()
|
||||
.find(".modal-header")
|
||||
.toggleClass("hidden", shouldHide);
|
||||
}
|
||||
|
||||
UserNotifications.prototype.closeAll = function () {
|
||||
"use strict"
|
||||
var self = this;
|
||||
var selector = self.getCorrectNotifSelector();
|
||||
if (!selector.is(":visible"))
|
||||
return;
|
||||
if (selector.find(".settingBox").is(":visible"))
|
||||
self.back();
|
||||
self.back();
|
||||
}
|
||||
|
||||
function bidping() {
|
||||
"use strict"
|
||||
if (BidooCnf.modules.exist(UserNotifications))
|
||||
BidooCnf.instances.user.notifications.bidping(getBidsBonus());
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
"use strict"
|
||||
BidooCnf.modules.notifications = UserNotifications;
|
||||
BidooCnf.instances.user.notifications = new UserNotifications();
|
||||
});
|
||||
@@ -0,0 +1,56 @@
|
||||
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-body-message{
|
||||
font-size: 20px !important;
|
||||
}
|
||||
|
||||
#onesignal-slidedown-container #onesignal-slidedown-dialog .primary.slidedown-button+.secondary.slidedown-button, #slidedown-footer #onesignal-slidedown-cancel-button {
|
||||
color: #666666 !important;
|
||||
}
|
||||
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-button.primary, #slidedown-footer #onesignal-slidedown-allow-button {
|
||||
background: #00CC66 !important;
|
||||
}
|
||||
@media(max-width:576px){
|
||||
#onesignal-slidedown-container #onesignal-slidedown-dialog .primary.slidedown-button+.secondary.slidedown-button, #slidedown-footer #onesignal-slidedown-cancel-button {
|
||||
padding: 10px;
|
||||
}
|
||||
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-button.primary, #slidedown-footer #onesignal-slidedown-allow-button {
|
||||
padding: 10px;
|
||||
}
|
||||
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-body-message{
|
||||
font-size: 16px !important;
|
||||
}
|
||||
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-body-icon{
|
||||
width: 60px;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
#modalExplainForMac .modal-body{
|
||||
padding: 30px 50px 0px;
|
||||
}
|
||||
#modalExplainForMac .logo{
|
||||
width: 40px;
|
||||
margin-top: -7px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#modalExplainForMac .intestazione{
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#modalExplainForMac p.sottotitolo{
|
||||
font-size: 16px;
|
||||
}
|
||||
#modalExplainForMac ol{
|
||||
padding-left: 15px;
|
||||
line-height: 23px;
|
||||
}
|
||||
#modalExplainForMac .modal-footer{
|
||||
border-top: none;
|
||||
padding-top: 5px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
#modalExplainForMac .modal-footer .btn-custom{
|
||||
background-color: #0c6;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
padding: 5px 30px;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42.26 31.61"><defs><style>.cls-1{fill:#fcc62d;}.cls-2{fill:#e4af18;}.cls-3{fill:#ce9912;}.cls-4{fill:#ffd949;}.cls-5{fill:#26a6fe;}.cls-6{fill:#0593fc;}.cls-7{fill:#fff;}.cls-8{fill:#f7cb15;}</style></defs><title>Asset 7circular-clock</title><g id="Layer_2" data-name="Layer 2"><g id="Livello_1" data-name="Livello 1"><path class="cls-1" d="M39,15.92v.67c0,3.78-6.34,6.84-14.16,6.84A22.67,22.67,0,0,1,14,21c.88,3.4,6.83,6.22,14.06,6.22,7.82,0,14.16-3.31,14.16-7.09C42.26,18.5,41,17,39,15.92"/><path class="cls-2" d="M28.1,27.25c-7.83,0-14.17-3.31-14.17-7.09v4.61c0,3.77,6.34,6.84,14.17,6.84s14.16-3.07,14.16-6.84V20.16c0,3.78-6.34,7.09-14.16,7.09"/><path class="cls-3" d="M15.56,28a8.75,8.75,0,0,0,1.09.85V24.31a8.9,8.9,0,0,1-1.09-.88Z"/><path class="cls-3" d="M39.54,24.31v4.52A8.75,8.75,0,0,0,40.63,28V23.43a8.9,8.9,0,0,1-1.09.88"/><path class="cls-3" d="M17.74,29.46c.34.18.71.35,1.09.51V25.5A11,11,0,0,1,17.74,25Z"/><path class="cls-3" d="M37.36,30c.38-.16.74-.33,1.09-.51V25c-.35.19-.71.37-1.09.53Z"/><path class="cls-3" d="M19.92,30.38c.35.12.72.23,1.09.34V26.3l-1.09-.36Z"/><path class="cls-3" d="M35.18,30.72c.37-.11.74-.22,1.09-.34V25.94l-1.09.36Z"/><path class="cls-3" d="M22.65,31.11c.35.07.71.14,1.08.19V26.92q-.56-.09-1.08-.21Z"/><path class="cls-3" d="M32.45,31.3c.37-.05.74-.12,1.1-.19v-4.4c-.36.08-.73.15-1.1.21Z"/><path class="cls-3" d="M25.91,31.55c.36,0,.73.05,1.09.06V27.25c-.36,0-.73,0-1.09-.06Z"/><path class="cls-3" d="M29.18,31.61c.37,0,.74,0,1.09-.06V27.19c-.35,0-.72,0-1.09.06Z"/><path class="cls-2" d="M24.83,19.07C17,19.07,10.66,15.76,10.66,12v4.61c0,3.78,6.34,6.84,14.17,6.84S39,20.37,39,16.59V12c0,3.78-6.34,7.09-14.16,7.09"/><path class="cls-3" d="M12.29,19.81a9.76,9.76,0,0,0,1.09.84V16.13a9.9,9.9,0,0,1-1.09-.87Z"/><path class="cls-3" d="M36.27,16.13v4.52a9.76,9.76,0,0,0,1.09-.84V15.26a9.9,9.9,0,0,1-1.09.87"/><path class="cls-3" d="M14.47,21.28c.34.18.71.35,1.09.51V17.32a11,11,0,0,1-1.09-.53Z"/><path class="cls-3" d="M34.09,21.79c.38-.16.75-.33,1.09-.51V16.79a11,11,0,0,1-1.09.53Z"/><path class="cls-3" d="M16.65,22.2c.35.12.72.23,1.09.34V18.12c-.37-.12-.74-.23-1.09-.36Z"/><path class="cls-3" d="M31.91,22.54c.37-.11.74-.22,1.09-.34V17.76c-.35.13-.72.24-1.09.36Z"/><path class="cls-3" d="M19.38,22.93c.35.07.71.14,1.08.19V18.74q-.55-.09-1.08-.21Z"/><path class="cls-3" d="M29.18,23.12c.37-.05.74-.12,1.09-.19v-4.4c-.35.08-.72.15-1.09.21Z"/><path class="cls-3" d="M22.65,23.37c.35,0,.72.05,1.08.06V19.07c-.36,0-.73,0-1.08-.06Z"/><path class="cls-3" d="M25.91,23.43c.37,0,.74,0,1.09-.06V19c-.35,0-.72,0-1.09.06Z"/><path class="cls-4" d="M38.62,18.15c-1.46,3-7.08,5.28-13.79,5.28a26.39,26.39,0,0,1-6.91-.87c2,1.35,5.49,2.49,10.18,2.49,7.45,0,12-2.89,12-4.89a2.72,2.72,0,0,0-1.46-2"/><path class="cls-4" d="M27.55,18c-7.83,0-14.17-3.06-14.17-6.84V8.06c-1.71,1.08-2.72,2.42-2.72,3.93,0,3.78,6.34,7.08,14.17,7.08a23.1,23.1,0,0,0,9.72-2,26.53,26.53,0,0,1-7,.89"/><path class="cls-2" d="M27.55,13.62c-7.83,0-14.17-3.31-14.17-7.08v4.6c0,3.78,6.34,6.84,14.17,6.84s14.17-3.06,14.17-6.84V6.54c0,3.77-6.34,7.08-14.17,7.08"/><path class="cls-3" d="M15,14.36a9.91,9.91,0,0,0,1.1.84V10.68A10,10,0,0,1,15,9.81Z"/><path class="cls-3" d="M39,10.68V15.2a8.92,8.92,0,0,0,1.09-.84V9.81a9,9,0,0,1-1.09.87"/><path class="cls-3" d="M17.2,15.83q.51.27,1.08.51V11.87a10.83,10.83,0,0,1-1.08-.53Z"/><path class="cls-3" d="M36.81,16.34c.39-.16.75-.33,1.09-.51V11.34a10,10,0,0,1-1.09.53Z"/><path class="cls-3" d="M19.38,16.75l1.08.34V12.67c-.37-.12-.73-.23-1.08-.36Z"/><path class="cls-3" d="M34.63,17.09c.38-.11.74-.22,1.09-.34V12.31c-.35.13-.71.24-1.09.36Z"/><path class="cls-3" d="M22.1,17.48c.36.07.72.14,1.09.19V13.29c-.37-.06-.73-.13-1.09-.21Z"/><path class="cls-3" d="M31.91,17.67c.37-.05.73-.12,1.09-.19v-4.4c-.36.08-.72.15-1.09.21Z"/><path class="cls-3" d="M25.37,17.92c.36,0,.72,0,1.09.06V13.62c-.37,0-.73,0-1.09-.06Z"/><path class="cls-3" d="M28.64,18c.37,0,.73,0,1.09-.06V13.56c-.36,0-.72,0-1.09.06Z"/><path class="cls-1" d="M41.72,6.54c0,3.78-6.34,7.08-14.17,7.08s-14.17-3.3-14.17-7.08S19.72,0,27.55,0,41.72,2.76,41.72,6.54"/><path class="cls-4" d="M27.55,11.43c-7.46,0-12-2.9-12-4.89s4.53-4.91,12-4.91,12,2.92,12,4.91-4.53,4.89-12,4.89"/><path class="cls-2" d="M27.38,2.39A12.74,12.74,0,0,1,31,2.93a4.9,4.9,0,0,0-.76.78h0l-.07.09a10.27,10.27,0,0,0-2.68-.36,8.26,8.26,0,0,0-2.15.23C22,4.38,22.1,6,22.12,6.22v0l0,0v0c-.21-.41-1-2.53,2.47-3.45l.22,0c.23-.06.46-.1.68-.14l.15,0,.17,0h.12l.1,0h.27A10.59,10.59,0,0,1,27.38,2.39Z"/><path class="cls-2" d="M30,4.77a8,8,0,0,1,1.14.07l1,1.08a5,5,0,0,1-.61.44,1,1,0,0,1-.25.12c-.3-.11-.59-.2-.86-.28s-.7-.19-1-.26a9.35,9.35,0,0,0-1.52-.19,2,2,0,0,0-1.08-.59A13.07,13.07,0,0,1,30,4.77Z"/><path class="cls-2" d="M26.09,5.32c.94,0,1.69.49,1.68,1.08a1.1,1.1,0,0,1-.84.91,2.69,2.69,0,0,1-.87.15,2.9,2.9,0,0,1-.61-.08c-.64-.15-1.08-.55-1.07-1S25.16,5.32,26.09,5.32Z"/><path class="cls-2" d="M28.57,6.66l.79.39.45.23,0,.06,0,.09c0,.17-.19.33-.47.37h-.15a.59.59,0,0,1-.57-.29c-.07-.17,0-.34.28-Line truncated
|
||||
|
After Width: | Height: | Size: 6.9 KiB |
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#2196F3;}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M13.38,38.44c-2.22,0-4.05,1.83-4.05,4.05c0,2.22,1.83,4.05,4.05,4.05c2.28,0,4.05-1.83,4.05-4.05
|
||||
C17.44,40.27,15.6,38.44,13.38,38.44z"/>
|
||||
<path class="st0" d="M43.7,38.44c-2.22,0-4.05,1.83-4.05,4.05c0,2.22,1.83,4.05,4.05,4.05c2.28,0,4.05-1.83,4.05-4.05
|
||||
C47.76,40.27,45.92,38.44,43.7,38.44z"/>
|
||||
<path class="st0" d="M44.54,34.05c0-0.5-0.39-0.83-0.83-0.83H21.44c-0.17,0-0.33,0.06-0.5,0.17l-3.55,2.67
|
||||
c-0.39,0.22-0.44,0.78-0.17,1.11c0.17,0.22,0.44,0.33,0.67,0.33c0.17,0,0.33-0.06,0.5-0.11l3.33-2.5H43.7
|
||||
C44.2,34.88,44.54,34.55,44.54,34.05z"/>
|
||||
<path class="st0" d="M49.87,15.23c-0.11-0.17-0.33-0.28-0.56-0.33L9.88,8.95L9.61,7.79C9,4.73,6.44,3.45,0.83,3.45
|
||||
C0.33,3.45,0,3.84,0,4.29c0,0.5,0.39,0.83,0.83,0.83c4.05,0,6.66,0.5,7.22,3.05L8.44,9.9c0,0.06,0,0.06,0,0.06l3.11,14.49
|
||||
c0.39,2.44,2.5,4.28,4.94,4.28h26.32c2.44,0,4.5-1.72,4.89-4.28l2.28-8.55C50.03,15.67,49.98,15.39,49.87,15.23z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#016FD0;}
|
||||
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
|
||||
.st2{fill-rule:evenodd;clip-rule:evenodd;fill:#016FD0;}
|
||||
</style>
|
||||
<g>
|
||||
<path class="st0" d="M80,47.33c0,1.47-1.19,2.67-2.67,2.67H2.67C1.19,50,0,48.81,0,47.33V2.67C0,1.19,1.19,0,2.67,0h74.67
|
||||
C78.81,0,80,1.19,80,2.67V47.33z"/>
|
||||
<g>
|
||||
<path class="st1" d="M19.5,37.15V26.63h11.14l1.2,1.56l1.23-1.56h40.44v9.8c0,0-1.06,0.72-2.28,0.73H48.84l-1.35-1.66v1.66h-4.42
|
||||
v-2.83c0,0-0.6,0.4-1.91,0.4h-1.5v2.44h-6.69l-1.19-1.59l-1.21,1.59L19.5,37.15L19.5,37.15z"/>
|
||||
<path class="st1" d="M6.49,18.7L9,12.85h4.34l1.43,3.28v-3.28h5.4l0.85,2.37l0.82-2.37h24.24v1.19c0,0,1.27-1.19,3.37-1.19
|
||||
l7.87,0.03l1.4,3.24v-3.27h4.52l1.24,1.86v-1.86h4.56v10.52h-4.56L63.3,21.5v1.87h-6.64l-0.67-1.66h-1.79l-0.66,1.66h-4.5
|
||||
c-1.8,0-2.95-1.17-2.95-1.17v1.17H39.3l-1.35-1.66v1.66H12.7l-0.67-1.66h-1.78l-0.66,1.66h-3.1V18.7L6.49,18.7z"/>
|
||||
<path class="st2" d="M9.89,14.14L6.5,22.02h2.21l0.63-1.58h3.63l0.62,1.58h2.25l-3.39-7.88H9.89L9.89,14.14z M11.15,15.98
|
||||
l1.11,2.76h-2.22L11.15,15.98L11.15,15.98z"/>
|
||||
<polygon class="st2" points="16.08,22.02 16.08,14.14 19.21,14.15 21.04,19.23 22.82,14.14 25.93,14.14 25.93,22.02 23.96,22.02
|
||||
23.96,16.21 21.87,22.02 20.14,22.02 18.05,16.21 18.05,22.02 16.08,22.02 "/>
|
||||
<polygon class="st2" points="27.28,22.02 27.28,14.14 33.7,14.14 33.7,15.9 29.27,15.9 29.27,17.25 33.6,17.25 33.6,18.91
|
||||
29.27,18.91 29.27,20.31 33.7,20.31 33.7,22.02 27.28,22.02 "/>
|
||||
<path class="st2" d="M34.84,14.14v7.88h1.97v-2.8h0.83l2.36,2.8h2.41l-2.59-2.9c1.06-0.09,2.16-1,2.16-2.42
|
||||
c0-1.66-1.3-2.56-2.75-2.56H34.84L34.84,14.14z M36.81,15.9h2.25c0.54,0,0.93,0.42,0.93,0.83c0,0.52-0.51,0.83-0.9,0.83h-2.28
|
||||
L36.81,15.9L36.81,15.9L36.81,15.9z"/>
|
||||
<polygon class="st2" points="44.79,22.02 42.78,22.02 42.78,14.14 44.79,14.14 44.79,22.02 "/>
|
||||
<path class="st2" d="M49.56,22.02h-0.43c-2.1,0-3.38-1.65-3.38-3.91c0-2.31,1.26-3.97,3.91-3.97h2.18v1.87h-2.26
|
||||
c-1.08,0-1.84,0.84-1.84,2.13c0,1.53,0.87,2.17,2.13,2.17h0.52L49.56,22.02L49.56,22.02z"/>
|
||||
<path class="st2" d="M53.85,14.14l-3.39,7.88h2.21l0.63-1.58h3.63l0.62,1.58h2.25l-3.39-7.88H53.85L53.85,14.14z M55.1,15.98
|
||||
l1.11,2.76h-2.22L55.1,15.98L55.1,15.98z"/>
|
||||
<polygon class="st2" points="60.03,22.02 60.03,14.14 62.54,14.14 65.74,19.09 65.74,14.14 67.7,14.14 67.7,22.02 65.28,22.02
|
||||
62,16.94 62,22.02 60.03,22.02 "/>
|
||||
<polygon class="st2" points="20.85,35.81 20.85,27.93 27.28,27.93 27.28,29.69 22.84,29.69 22.84,31.04 27.17,31.04 27.17,32.7
|
||||
22.84,32.7 22.84,34.1 27.28,34.1 27.28,35.81 20.85,35.81 "/>
|
||||
<polygon class="st2" points="52.34,35.81 52.34,27.93 58.77,27.93 58.77,29.69 54.33,29.69 54.33,31.04 58.64,31.04 58.64,32.7
|
||||
54.33,32.7 54.33,34.1 58.77,34.1 58.77,35.81 52.34,35.81 "/>
|
||||
<polygon class="st2" points="27.52,35.81 30.65,31.92 27.45,27.93 29.93,27.93 31.84,30.39 33.75,27.93 36.14,27.93 32.98,31.87
|
||||
36.11,35.81 33.63,35.81 31.78,33.38 29.97,35.81 27.52,35.81 "/>
|
||||
<path class="st2" d="M36.35,27.93v7.88h2.02v-2.49h2.07c1.75,0,3.08-0.93,3.08-2.74c0-1.5-1.04-2.65-2.83-2.65H36.35L36.35,27.93z
|
||||
M38.37,29.71h2.18c0.57,0,0.97,0.35,0.97,0.91c0,0.53-0.4,0.91-0.98,0.91h-2.18V29.71L38.37,29.71L38.37,29.71z"/>
|
||||
<path class="st2" d="M44.38,27.93v7.88h1.97v-2.8h0.83l2.36,2.8h2.41l-2.59-2.9c1.06-0.09,2.16-1,2.16-2.42
|
||||
c0-1.66-1.3-2.56-2.75-2.56L44.38,27.93L44.38,27.93L44.38,27.93z M46.35,29.69h2.25c0.54,0,0.93,0.42,0.93,0.83
|
||||
c0,0.52-0.51,0.83-0.9,0.83h-2.28V29.69L46.35,29.69z"/>
|
||||
<path class="st2" d="M59.68,35.81V34.1h3.94c0.58,0,0.84-0.32,0.84-0.66c0-0.33-0.25-0.67-0.84-0.67h-1.78
|
||||
c-1.55,0-2.41-0.94-2.41-2.36c0-1.26,0.79-2.48,3.09-2.48h3.84l-0.83,1.77h-3.32c-0.63,0-0.83,0.33-0.83,0.65
|
||||
c0,0.33,0.24,0.69,0.73,0.69h1.87c1.73,0,2.47,0.98,2.47,2.26c0,1.38-0.83,2.51-2.57,2.51L59.68,35.81L59.68,35.81z"/>
|
||||
<path class="st2" d="M66.91,35.81V34.1h3.78c0.58,0,0.84-0.32,0.84-0.66c0-0.33-0.25-0.67-0.84-0.67h-1.61
|
||||
c-1.55,0-2.41-0.94-2.41-2.36c0-1.26,0.79-2.48,3.09-2.48h3.76l-0.83,1.77h-3.24c-0.63,0-0.83,0.33-0.83,0.65
|
||||
c0,0.33,0.24,0.69,0.73,0.69h1.7c1.73,0,2.48,0.98,2.48,2.26c0,1.38-0.83,2.51-2.57,2.51L66.91,35.81L66.91,35.81z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#F9F9F9;}
|
||||
.st1{fill:#6C6BBD;}
|
||||
.st2{fill:#D32011;}
|
||||
.st3{fill:#0099DF;}
|
||||
.st4{fill:#110F0D;}
|
||||
</style>
|
||||
<g>
|
||||
<path class="st0" d="M76.56,50H3.44C1.55,50,0,48.45,0,46.56V3.44C0,1.55,1.55,0,3.44,0h73.12C78.45,0,80,1.55,80,3.44v43.12
|
||||
C80,48.45,78.45,50,76.56,50z"/>
|
||||
<g>
|
||||
<polygon class="st1" points="46.47,32.85 33.53,32.85 33.53,9.6 46.47,9.6 "/>
|
||||
<path class="st2" d="M34.35,21.22c0-4.72,2.21-8.92,5.65-11.63c-2.51-1.98-5.69-3.16-9.14-3.16c-8.17,0-14.79,6.62-14.79,14.79
|
||||
s6.62,14.79,14.79,14.79c3.45,0,6.62-1.18,9.14-3.16C36.56,30.14,34.35,25.94,34.35,21.22"/>
|
||||
<path class="st3" d="M63.92,21.22c0,8.17-6.62,14.79-14.79,14.79c-3.45,0-6.62-1.18-9.14-3.16c3.44-2.71,5.65-6.91,5.65-11.63
|
||||
S43.44,12.3,40,9.6c2.52-1.98,5.69-3.16,9.14-3.16C57.3,6.43,63.92,13.05,63.92,21.22"/>
|
||||
<path class="st4" d="M50.85,39.42c0.17,0,0.42,0.03,0.61,0.11l-0.26,0.8c-0.18-0.07-0.36-0.1-0.53-0.1
|
||||
c-0.56,0-0.84,0.36-0.84,1.01v2.2h-0.85v-3.93h0.85v0.48C50.03,39.65,50.35,39.42,50.85,39.42L50.85,39.42z M47.69,40.3h-1.4v1.77
|
||||
c0,0.39,0.14,0.66,0.57,0.66c0.22,0,0.5-0.07,0.75-0.22l0.25,0.73c-0.27,0.19-0.7,0.3-1.07,0.3c-1.01,0-1.36-0.54-1.36-1.45V40.3
|
||||
h-0.8v-0.78h0.8v-1.19h0.86v1.19h1.4V40.3L47.69,40.3z M36.76,41.13c0.09-0.57,0.44-0.95,1.04-0.95c0.55,0,0.9,0.35,0.99,0.95
|
||||
H36.76z M39.68,41.48c-0.01-1.22-0.76-2.06-1.87-2.06c-1.15,0-1.95,0.84-1.95,2.06c0,1.25,0.84,2.06,2.01,2.06
|
||||
c0.59,0,1.13-0.15,1.61-0.55l-0.42-0.63c-0.33,0.26-0.75,0.41-1.14,0.41c-0.55,0-1.05-0.25-1.17-0.96h2.92
|
||||
C39.67,41.7,39.68,41.59,39.68,41.48L39.68,41.48z M43.43,40.52c-0.24-0.15-0.72-0.34-1.22-0.34c-0.47,0-0.75,0.17-0.75,0.46
|
||||
c0,0.26,0.3,0.34,0.66,0.39l0.4,0.06c0.85,0.12,1.37,0.49,1.37,1.18c0,0.75-0.66,1.28-1.79,1.28c-0.64,0-1.23-0.16-1.7-0.51
|
||||
l0.4-0.67c0.29,0.22,0.72,0.41,1.31,0.41c0.58,0,0.89-0.17,0.89-0.48c0-0.22-0.22-0.35-0.69-0.41l-0.4-0.06
|
||||
c-0.88-0.12-1.36-0.52-1.36-1.16c0-0.78,0.64-1.26,1.63-1.26c0.62,0,1.19,0.14,1.6,0.41L43.43,40.52L43.43,40.52z M53.97,40.23
|
||||
c-0.18,0-0.34,0.03-0.49,0.09c-0.15,0.06-0.28,0.15-0.39,0.26c-0.11,0.11-0.2,0.24-0.26,0.4c-0.06,0.16-0.09,0.33-0.09,0.51
|
||||
c0,0.19,0.03,0.36,0.09,0.51c0.06,0.16,0.15,0.29,0.26,0.4c0.11,0.11,0.24,0.2,0.39,0.26c0.15,0.06,0.31,0.09,0.49,0.09
|
||||
c0.18,0,0.34-0.03,0.49-0.09c0.15-0.06,0.28-0.15,0.39-0.26c0.11-0.11,0.2-0.24,0.26-0.4c0.06-0.16,0.09-0.33,0.09-0.51
|
||||
c0-0.19-0.03-0.36-0.09-0.51c-0.06-0.16-0.15-0.29-0.26-0.4c-0.11-0.11-0.24-0.2-0.39-0.26C54.31,40.26,54.14,40.23,53.97,40.23
|
||||
L53.97,40.23z M53.97,39.42c0.3,0,0.59,0.05,0.85,0.16c0.26,0.11,0.48,0.25,0.67,0.44c0.19,0.19,0.34,0.4,0.44,0.66
|
||||
c0.11,0.25,0.16,0.53,0.16,0.82c0,0.3-0.05,0.57-0.16,0.82c-0.11,0.25-0.25,0.47-0.44,0.66c-0.19,0.19-0.41,0.33-0.67,0.44
|
||||
c-0.26,0.11-0.54,0.16-0.85,0.16s-0.59-0.05-0.85-0.16c-0.26-0.11-0.48-0.25-0.67-0.44c-0.19-0.19-0.34-0.41-0.44-0.66
|
||||
c-0.11-0.25-0.16-0.53-0.16-0.82c0-0.3,0.05-0.57,0.16-0.82c0.11-0.25,0.25-0.47,0.44-0.66c0.19-0.19,0.41-0.33,0.67-0.44
|
||||
C53.38,39.47,53.66,39.42,53.97,39.42L53.97,39.42z M31.77,41.48c0-0.69,0.45-1.26,1.19-1.26c0.71,0,1.18,0.54,1.18,1.26
|
||||
c0,0.71-0.48,1.26-1.18,1.26C32.22,42.73,31.77,42.17,31.77,41.48L31.77,41.48z M34.95,41.48v-1.96h-0.85v0.48
|
||||
c-0.27-0.35-0.68-0.58-1.24-0.58c-1.1,0-1.96,0.86-1.96,2.06c0,1.2,0.86,2.06,1.96,2.06c0.56,0,0.97-0.22,1.24-0.58v0.48h0.85
|
||||
V41.48z M30.13,43.44v-2.46c0-0.93-0.59-1.55-1.54-1.56c-0.5-0.01-1.02,0.15-1.38,0.7c-0.27-0.44-0.7-0.7-1.3-0.7
|
||||
c-0.42,0-0.83,0.12-1.15,0.58v-0.48h-0.85v3.93h0.86v-2.18c0-0.68,0.38-1.04,0.96-1.04c0.57,0,0.85,0.37,0.85,1.04v2.18h0.86
|
||||
v-2.18c0-0.68,0.39-1.04,0.96-1.04c0.58,0,0.86,0.37,0.86,1.04v2.18H30.13L30.13,43.44z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#F9F9F9;}
|
||||
.st1{fill:#FF5F00;}
|
||||
.st2{fill:#EB001B;}
|
||||
.st3{fill:#F79E1B;}
|
||||
</style>
|
||||
<g>
|
||||
<path class="st0" d="M76.56,50H3.44C1.55,50,0,48.45,0,46.56V3.44C0,1.55,1.55,0,3.44,0h73.12C78.45,0,80,1.55,80,3.44v43.12
|
||||
C80,48.45,78.45,50,76.56,50z"/>
|
||||
<g>
|
||||
<path d="M24.81,43.45v-2.46c0-0.94-0.57-1.56-1.56-1.56c-0.49,0-1.03,0.16-1.39,0.7c-0.29-0.45-0.7-0.7-1.31-0.7
|
||||
c-0.41,0-0.82,0.12-1.15,0.57v-0.49h-0.86v3.94h0.86v-2.17c0-0.7,0.37-1.03,0.94-1.03s0.86,0.37,0.86,1.03v2.17h0.86v-2.17
|
||||
c0-0.7,0.41-1.03,0.94-1.03c0.57,0,0.86,0.37,0.86,1.03v2.17H24.81L24.81,43.45z M37.56,39.52h-1.39v-1.19H35.3v1.19h-0.78v0.78
|
||||
h0.78v1.8c0,0.9,0.37,1.44,1.35,1.44c0.37,0,0.78-0.12,1.07-0.29l-0.25-0.74c-0.25,0.16-0.53,0.21-0.74,0.21
|
||||
c-0.41,0-0.57-0.25-0.57-0.66V40.3h1.39V39.52L37.56,39.52z M44.86,39.43c-0.49,0-0.82,0.25-1.03,0.57v-0.49h-0.86v3.94h0.86
|
||||
v-2.21c0-0.66,0.29-1.03,0.82-1.03c0.16,0,0.37,0.04,0.53,0.08l0.25-0.82C45.27,39.43,45.02,39.43,44.86,39.43L44.86,39.43
|
||||
L44.86,39.43z M33.83,39.84c-0.41-0.29-0.98-0.41-1.6-0.41c-0.98,0-1.64,0.49-1.64,1.27c0,0.66,0.49,1.03,1.35,1.15l0.41,0.04
|
||||
c0.45,0.08,0.7,0.21,0.7,0.41c0,0.29-0.33,0.49-0.9,0.49c-0.57,0-1.03-0.21-1.31-0.41l-0.41,0.66c0.45,0.33,1.07,0.49,1.68,0.49
|
||||
c1.15,0,1.8-0.53,1.8-1.27c0-0.7-0.53-1.07-1.35-1.19l-0.41-0.04c-0.37-0.04-0.66-0.12-0.66-0.37c0-0.29,0.29-0.45,0.74-0.45
|
||||
c0.49,0,0.98,0.21,1.23,0.33L33.83,39.84L33.83,39.84z M56.71,39.43c-0.49,0-0.82,0.25-1.03,0.57v-0.49h-0.86v3.94h0.86v-2.21
|
||||
c0-0.66,0.29-1.03,0.82-1.03c0.16,0,0.37,0.04,0.53,0.08l0.25-0.82C57.12,39.43,56.87,39.43,56.71,39.43L56.71,39.43L56.71,39.43z
|
||||
M45.72,41.49c0,1.19,0.82,2.05,2.09,2.05c0.57,0,0.98-0.12,1.39-0.45l-0.41-0.7c-0.33,0.25-0.66,0.37-1.03,0.37
|
||||
c-0.7,0-1.19-0.49-1.19-1.27c0-0.74,0.49-1.23,1.19-1.27c0.37,0,0.7,0.12,1.03,0.37l0.41-0.7c-0.41-0.33-0.82-0.45-1.39-0.45
|
||||
C46.54,39.43,45.72,40.3,45.72,41.49L45.72,41.49L45.72,41.49z M53.68,41.49v-1.97h-0.86v0.49c-0.29-0.37-0.7-0.57-1.23-0.57
|
||||
c-1.11,0-1.97,0.86-1.97,2.05c0,1.19,0.86,2.05,1.97,2.05c0.57,0,0.98-0.21,1.23-0.57v0.49h0.86V41.49z M50.52,41.49
|
||||
c0-0.7,0.45-1.27,1.19-1.27c0.7,0,1.19,0.53,1.19,1.27c0,0.7-0.49,1.27-1.19,1.27C50.97,42.72,50.52,42.18,50.52,41.49
|
||||
L50.52,41.49z M40.23,39.43c-1.15,0-1.97,0.82-1.97,2.05s0.82,2.05,2.01,2.05c0.57,0,1.15-0.16,1.6-0.53l-0.41-0.62
|
||||
c-0.33,0.25-0.74,0.41-1.15,0.41c-0.53,0-1.07-0.25-1.19-0.94h2.91v-0.33C42.07,40.26,41.33,39.43,40.23,39.43L40.23,39.43
|
||||
L40.23,39.43z M40.23,40.17c0.53,0,0.9,0.33,0.98,0.94h-2.05C39.24,40.58,39.61,40.17,40.23,40.17L40.23,40.17z M61.59,41.49
|
||||
v-3.53h-0.86v2.05c-0.29-0.37-0.7-0.57-1.23-0.57c-1.11,0-1.97,0.86-1.97,2.05c0,1.19,0.86,2.05,1.97,2.05
|
||||
c0.57,0,0.98-0.21,1.23-0.57v0.49h0.86V41.49z M58.43,41.49c0-0.7,0.45-1.27,1.19-1.27c0.7,0,1.19,0.53,1.19,1.27
|
||||
c0,0.7-0.49,1.27-1.19,1.27C58.88,42.72,58.43,42.18,58.43,41.49L58.43,41.49z M29.65,41.49v-1.97h-0.86v0.49
|
||||
c-0.29-0.37-0.7-0.57-1.23-0.57c-1.11,0-1.97,0.86-1.97,2.05c0,1.19,0.86,2.05,1.97,2.05c0.57,0,0.98-0.21,1.23-0.57v0.49h0.86
|
||||
V41.49z M26.45,41.49c0-0.7,0.45-1.27,1.19-1.27c0.7,0,1.19,0.53,1.19,1.27c0,0.7-0.49,1.27-1.19,1.27
|
||||
C26.9,42.72,26.45,42.18,26.45,41.49z"/>
|
||||
<rect x="33.54" y="9.62" class="st1" width="12.92" height="23.21"/>
|
||||
<path class="st2" d="M34.36,21.23c0-4.72,2.21-8.9,5.62-11.61c-2.5-1.97-5.66-3.16-9.1-3.16c-8.16,0-14.76,6.6-14.76,14.76
|
||||
s6.6,14.76,14.76,14.76c3.44,0,6.6-1.19,9.1-3.16C36.58,30.17,34.36,25.94,34.36,21.23z"/>
|
||||
<path class="st3" d="M63.89,21.23c0,8.16-6.6,14.76-14.76,14.76c-3.44,0-6.6-1.19-9.1-3.16c3.44-2.71,5.62-6.89,5.62-11.61
|
||||
s-2.21-8.9-5.62-11.61c2.5-1.97,5.66-3.16,9.1-3.16C57.28,6.46,63.89,13.11,63.89,21.23z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#009EE3;}
|
||||
.st2{fill-rule:evenodd;clip-rule:evenodd;fill:#113984;}
|
||||
.st3{fill-rule:evenodd;clip-rule:evenodd;fill:#172C70;}
|
||||
</style>
|
||||
<g>
|
||||
<path class="st0" d="M76.56,50H3.44C1.55,50,0,48.45,0,46.56V3.44C0,1.55,1.55,0,3.44,0h73.12C78.45,0,80,1.55,80,3.44v43.12
|
||||
C80,48.45,78.45,50,76.56,50z"/>
|
||||
<g>
|
||||
<path class="st1" d="M14.63,21.06h4.2c2.26,0,3.1,1.14,2.97,2.82c-0.22,2.77-1.89,4.3-4.11,4.3h-1.12c-0.3,0-0.51,0.2-0.59,0.75
|
||||
L15.5,32.1c-0.03,0.21-0.14,0.33-0.3,0.34h-2.64c-0.25,0-0.34-0.19-0.27-0.6l1.61-10.18C13.96,21.25,14.19,21.06,14.63,21.06z"/>
|
||||
<path class="st2" d="M32.87,20.87c1.42,0,2.72,0.77,2.55,2.68c-0.22,2.28-1.44,3.54-3.36,3.54h-1.68c-0.24,0-0.36,0.2-0.42,0.6
|
||||
l-0.33,2.07c-0.05,0.31-0.21,0.47-0.45,0.47h-1.56c-0.25,0-0.34-0.16-0.28-0.52l1.29-8.29c0.06-0.41,0.22-0.56,0.5-0.56H32.87
|
||||
L32.87,20.87z M30.32,25.31h1.27c0.8-0.03,1.33-0.58,1.38-1.58c0.03-0.61-0.38-1.05-1.04-1.05l-1.2,0.01L30.32,25.31L30.32,25.31z
|
||||
M39.67,29.6c0.14-0.13,0.29-0.2,0.27-0.04l-0.05,0.38c-0.03,0.2,0.05,0.31,0.24,0.31h1.39c0.23,0,0.35-0.09,0.41-0.46l0.86-5.38
|
||||
c0.04-0.27-0.02-0.4-0.23-0.4h-1.53c-0.14,0-0.2,0.08-0.24,0.29l-0.06,0.33c-0.03,0.17-0.11,0.2-0.18,0.03
|
||||
c-0.26-0.61-0.92-0.89-1.84-0.87c-2.14,0.04-3.59,1.67-3.74,3.76c-0.12,1.61,1.04,2.88,2.56,2.88
|
||||
C38.62,30.44,39.11,30.11,39.67,29.6L39.67,29.6L39.67,29.6z M38.5,28.77c-0.92,0-1.57-0.74-1.43-1.64s1-1.64,1.92-1.64
|
||||
s1.57,0.74,1.43,1.64S39.42,28.77,38.5,28.77L38.5,28.77z M45.49,24h-1.41c-0.29,0-0.41,0.22-0.32,0.48l1.75,5.12l-1.72,2.44
|
||||
c-0.14,0.2-0.03,0.39,0.17,0.39h1.58c0.19,0.02,0.37-0.07,0.47-0.23l5.38-7.72C51.57,24.25,51.5,24,51.22,24h-1.5
|
||||
c-0.26,0-0.36,0.1-0.51,0.32l-2.24,3.25l-1-3.26C45.91,24.11,45.77,24,45.49,24L45.49,24z"/>
|
||||
<path class="st1" d="M57.01,20.87c1.42,0,2.72,0.77,2.55,2.68c-0.22,2.28-1.44,3.54-3.36,3.54h-1.68c-0.24,0-0.36,0.2-0.42,0.6
|
||||
l-0.33,2.07c-0.05,0.31-0.21,0.47-0.45,0.47h-1.56c-0.25,0-0.34-0.16-0.28-0.52l1.29-8.29c0.06-0.41,0.22-0.56,0.5-0.56
|
||||
L57.01,20.87L57.01,20.87z M54.46,25.31h1.27c0.8-0.03,1.33-0.58,1.38-1.58c0.03-0.61-0.38-1.05-1.04-1.05l-1.2,0.01L54.46,25.31
|
||||
L54.46,25.31z M63.81,29.6c0.14-0.13,0.29-0.2,0.27-0.04l-0.05,0.38c-0.03,0.2,0.05,0.31,0.24,0.31h1.39
|
||||
c0.23,0,0.35-0.09,0.41-0.46l0.86-5.38c0.04-0.27-0.02-0.4-0.23-0.4h-1.53c-0.14,0-0.2,0.08-0.24,0.29l-0.06,0.33
|
||||
c-0.03,0.17-0.11,0.2-0.18,0.03c-0.26-0.61-0.92-0.89-1.84-0.87c-2.14,0.04-3.59,1.67-3.74,3.76c-0.12,1.61,1.04,2.88,2.56,2.88
|
||||
C62.76,30.44,63.26,30.11,63.81,29.6L63.81,29.6L63.81,29.6z M62.64,28.77c-0.92,0-1.57-0.74-1.43-1.64s1-1.64,1.92-1.64
|
||||
c0.92,0,1.57,0.74,1.43,1.64S63.57,28.77,62.64,28.77L62.64,28.77z M69.05,30.26h-1.6c-0.1,0-0.19-0.08-0.2-0.18
|
||||
c0-0.01,0-0.02,0-0.04l1.41-8.93c0.03-0.13,0.14-0.22,0.27-0.22h1.6c0.1,0,0.19,0.08,0.2,0.18c0,0.01,0,0.02,0,0.04l-1.41,8.93
|
||||
C69.29,30.17,69.18,30.26,69.05,30.26L69.05,30.26z"/>
|
||||
<path class="st2" d="M12,17.55h4.2c1.18,0,2.59,0.04,3.53,0.87c0.63,0.55,0.96,1.44,0.88,2.39c-0.26,3.21-2.18,5.01-4.75,5.01
|
||||
h-2.07c-0.35,0-0.59,0.23-0.69,0.87l-0.58,3.69c-0.04,0.24-0.14,0.38-0.33,0.4H9.61c-0.29,0-0.39-0.22-0.31-0.7l1.86-11.82
|
||||
C11.23,17.78,11.49,17.55,12,17.55z"/>
|
||||
<path class="st3" d="M13.17,26.31l0.73-4.65c0.06-0.41,0.29-0.6,0.73-0.6h4.2c0.69,0,1.26,0.11,1.7,0.31
|
||||
c-0.42,2.86-2.27,4.45-4.69,4.45h-2.07C13.49,25.81,13.29,25.95,13.17,26.31z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FBE200;}
|
||||
.st1{fill:#004A99;}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M80,47.33c0,1.47-1.19,2.67-2.67,2.67H2.67C1.19,50,0,48.81,0,47.33V2.67C0,1.19,1.19,0,2.67,0h74.67
|
||||
C78.81,0,80,1.19,80,2.67V47.33z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st1" d="M14.1,20.45c-0.38,0-0.8,0.06-1.15,0.21c-0.09,0.03-0.21,0.06-0.3,0.12c-0.44,0.21-0.89,0.56-1.33,1
|
||||
l0.12-1.21h-1.42C10,20.92,9.97,21.25,9.94,21.6c-0.06,0.35-0.12,0.68-0.18,1.03l-2.04,8.95h1.57l0.95-4.11
|
||||
c0.3,0.41,0.65,0.74,1.03,0.95c0.41,0.21,0.86,0.33,1.42,0.33c0.09,0,0.18,0,0.27,0c0.59-0.06,1.12-0.21,1.6-0.5
|
||||
c0.59-0.33,1.06-0.8,1.42-1.42c0.32-0.5,0.56-1.09,0.71-1.77c0.18-0.68,0.24-1.33,0.18-1.92c-0.09-0.83-0.35-1.51-0.86-1.98
|
||||
C15.52,20.69,14.87,20.45,14.1,20.45z M15.14,24.73c-0.15,0.56-0.35,1.06-0.62,1.54c-0.27,0.47-0.59,0.83-0.97,1.06
|
||||
c-0.18,0.09-0.38,0.18-0.59,0.24c-0.21,0.06-0.44,0.09-0.68,0.09c-0.47,0-0.86-0.15-1.15-0.41c-0.3-0.3-0.47-0.65-0.5-1.12
|
||||
c-0.03-0.41,0-0.92,0.15-1.57c0.15-0.62,0.35-1.18,0.62-1.65c0.24-0.47,0.56-0.86,0.95-1.12c0.21-0.12,0.41-0.24,0.62-0.3
|
||||
c0.18-0.06,0.38-0.09,0.59-0.09c0.47,0,0.89,0.15,1.21,0.47c0.3,0.33,0.47,0.74,0.53,1.27C15.32,23.64,15.29,24.17,15.14,24.73z"
|
||||
/>
|
||||
<path class="st1" d="M53.78,21.04c-0.44-0.44-1.06-0.68-1.83-0.68c-0.5,0-0.97,0.09-1.39,0.3c-0.06,0.03-0.12,0.06-0.21,0.09
|
||||
c-0.35,0.21-0.68,0.47-1.03,0.8l0.06-0.97h-2.22c-0.06,0.53-0.21,1.36-0.44,2.45l-1.89,8.57h2.45l0.95-4.22
|
||||
c0.24,0.44,0.56,0.8,0.97,1c0.32,0.18,0.71,0.3,1.15,0.33c0.09,0,0.21,0.03,0.3,0.03c1.24,0,2.25-0.56,2.98-1.68
|
||||
c0.77-1.09,1.06-2.45,0.92-4.05C54.49,22.13,54.23,21.48,53.78,21.04z M52.04,24.53c-0.12,0.53-0.3,1.03-0.5,1.48
|
||||
c-0.21,0.41-0.41,0.71-0.68,0.92c-0.15,0.12-0.32,0.21-0.5,0.24c-0.12,0.03-0.24,0.06-0.35,0.06c-0.41,0-0.74-0.15-0.97-0.41
|
||||
c-0.27-0.27-0.38-0.65-0.44-1.15c-0.09-0.97,0.09-1.86,0.56-2.66c0.32-0.56,0.74-0.95,1.21-1.09c0.18-0.03,0.32-0.06,0.5-0.06
|
||||
c0.38,0,0.68,0.12,0.92,0.35c0.21,0.21,0.35,0.53,0.38,0.97C52.19,23.55,52.16,24,52.04,24.53z"/>
|
||||
<path class="st1" d="M61.91,20.95c-0.56-0.35-1.33-0.5-2.36-0.5c-0.33,0-0.65,0-0.95,0.06c-0.62,0.09-1.12,0.27-1.57,0.53
|
||||
c-0.59,0.41-0.95,0.97-1,1.71h2.33c0.06-0.24,0.12-0.44,0.24-0.59c0.03-0.09,0.09-0.12,0.15-0.18c0.18-0.15,0.44-0.24,0.8-0.24
|
||||
c0.3,0,0.53,0.06,0.68,0.18c0.18,0.12,0.27,0.3,0.3,0.53c0,0.12,0,0.24-0.03,0.38c0,0.18-0.06,0.38-0.12,0.68
|
||||
c-0.09,0-0.18,0-0.27,0s-0.24,0-0.41,0c-0.38,0-0.77,0-1.09,0.03c-1.15,0.09-2.04,0.35-2.69,0.77c-0.83,0.53-1.21,1.3-1.12,2.3
|
||||
c0.06,0.65,0.3,1.15,0.74,1.54c0.44,0.38,1,0.59,1.71,0.59c0.5,0,0.92-0.12,1.3-0.33l0.06-0.03c0.35-0.18,0.71-0.5,1-0.92
|
||||
c0,0.21-0.03,0.38-0.03,0.59c0,0.21,0,0.38,0,0.56h2.25c0-0.35,0-0.68,0.03-1.03c0.06-0.35,0.09-0.68,0.18-1l0.62-2.72
|
||||
c0.06-0.27,0.12-0.53,0.15-0.74c0.03-0.24,0.03-0.44,0-0.65C62.73,21.81,62.44,21.31,61.91,20.95z M59.31,26.6
|
||||
c-0.24,0.27-0.47,0.44-0.71,0.56c-0.18,0.09-0.38,0.12-0.59,0.12c-0.27,0-0.47-0.06-0.62-0.21c-0.18-0.15-0.27-0.35-0.27-0.62
|
||||
c-0.06-0.47,0.15-0.89,0.65-1.21c0.24-0.18,0.5-0.3,0.83-0.38c0.3-0.09,0.65-0.12,1.03-0.12c0.12,0,0.18,0,0.27,0
|
||||
c0.06,0,0.12,0,0.18,0.03C59.96,25.5,59.69,26.12,59.31,26.6z"/>
|
||||
<polygon class="st1" points="69.97,20.51 66.84,26.06 66.16,20.51 63.74,20.51 65.16,28.6 63.21,31.56 65.81,31.56 67.25,28.93
|
||||
72.28,20.51 "/>
|
||||
<path class="st1" d="M23.91,21.04c-0.56-0.44-1.3-0.68-2.25-0.68c-0.27,0-0.53,0-0.77,0.03c-0.47,0.06-0.95,0.18-1.33,0.33
|
||||
c-0.59,0.27-1.06,0.62-1.45,1.12c-0.41,0.56-0.71,1.21-0.92,1.98c-0.24,0.77-0.3,1.48-0.24,2.19c0.06,0.86,0.38,1.54,0.97,2.01
|
||||
c0.56,0.5,1.33,0.74,2.27,0.74c0.24,0,0.47-0.03,0.68-0.03c0.59-0.06,1.09-0.18,1.51-0.38c0.59-0.27,1.06-0.71,1.48-1.33
|
||||
c0.35-0.53,0.62-1.18,0.8-1.92c0.21-0.74,0.27-1.45,0.21-2.1C24.8,22.16,24.5,21.51,23.91,21.04z M23.12,24.76
|
||||
c-0.15,0.62-0.35,1.18-0.65,1.68c-0.27,0.44-0.56,0.77-0.92,0.97c-0.18,0.12-0.41,0.21-0.65,0.27c-0.18,0.03-0.35,0.06-0.56,0.06
|
||||
c-0.53,0-0.95-0.15-1.27-0.44c-0.3-0.3-0.5-0.68-0.53-1.21c-0.03-0.47,0-1.03,0.15-1.68s0.35-1.18,0.62-1.62
|
||||
c0.27-0.47,0.59-0.83,0.95-1.09c0.21-0.12,0.44-0.21,0.65-0.27s0.38-0.09,0.59-0.09c0.56,0,0.98,0.15,1.27,0.44
|
||||
c0.3,0.27,0.47,0.71,0.53,1.33C23.32,23.58,23.26,24.11,23.12,24.76z"/>
|
||||
<path class="st1" d="M31.06,20.78c-0.44-0.27-1.12-0.41-2.04-0.41c-1,0-1.8,0.24-2.39,0.68c-0.56,0.47-0.83,1.03-0.77,1.74
|
||||
c0.03,0.41,0.21,0.8,0.56,1.09c0.32,0.33,0.92,0.68,1.74,1.06c0.65,0.3,1.06,0.53,1.27,0.71c0.21,0.18,0.32,0.38,0.32,0.62
|
||||
c0.03,0.38-0.12,0.71-0.47,0.97c-0.35,0.24-0.83,0.35-1.45,0.35c-0.47,0-0.8-0.06-1.03-0.24c-0.24-0.15-0.35-0.38-0.38-0.71
|
||||
c-0.03-0.09-0.03-0.18,0-0.3c0-0.12,0.03-0.24,0.09-0.38h-1.6c-0.03,0.18-0.06,0.35-0.09,0.5c-0.03,0.18-0.03,0.32,0,0.44
|
||||
c0.06,0.59,0.32,1.03,0.83,1.36c0.53,0.3,1.21,0.47,2.1,0.47c1.12,0,2.04-0.27,2.72-0.77c0.71-0.5,1-1.15,0.95-1.89
|
||||
c-0.03-0.44-0.21-0.83-0.47-1.12c-0.27-0.3-0.92-0.68-1.86-1.12c-0.68-0.32-1.12-0.56-1.3-0.74c-0.21-0.15-0.3-0.35-0.32-0.56
|
||||
c-0.03-0.35,0.09-0.65,0.38-0.86c0.27-0.21,0.65-0.33,1.15-0.33c0.44,0,0.77,0.09,0.97,0.24c0.24,0.15,0.35,0.38,0.38,0.68
|
||||
c0,0.06,0,0.15,0,0.21s0,0.15,0,0.24h1.45c0.03-0.21,0.03-0.35,0.03-0.44c0-0.12,0-0.21,0-0.3
|
||||
C31.77,21.43,31.54,21.04,31.06,20.78z"/>
|
||||
<path class="st1" d="M35.55,27.6c-0.35,0-0.62-0.06-0.77-0.18c-0.15-0.09-0.24-0.24-0.24-0.47c-0.03-0.09,0-0.21,0.03-0.38
|
||||
c0-0.15,0.06-0.38,0.15-0.71l0.89-4.2h1.74l0.24-1.03h-1.74l0.47-2.22l-1.57,0.38l-0.41,1.83h-1.45l-0.27,1.03h1.48l-0.92,4.02
|
||||
c-0.06,0.38-0.15,0.74-0.18,1.09c-0.03,0.33-0.06,0.59-0.03,0.74c0.03,0.44,0.18,0.77,0.47,0.95c0.27,0.21,0.71,0.3,1.3,0.3
|
||||
c0.21,0,0.44-0.03,0.68-0.03c0.24-0.03,0.5-0.06,0.8-0.09l0.27-1.18c-0.15,0.03-0.32,0.09-0.47,0.09
|
||||
C35.85,27.57,35.67,27.6,35.55,27.6z"/>
|
||||
<path class="st1" d="M39.01,24.76h2.33h3.43c0.09-0.35,0.15-0.71,0.15-1.03c0.03-0.32,0.03-0.65,0-0.95
|
||||
c-0.06-0.86-0.38-1.48-0.89-1.86c-0.53-0.38-1.33-0.59-2.36-0.59c-0.12,0-0.21,0-0.32,0c-0.62,0.06-1.15,0.18-1.62,0.44
|
||||
c-0.56,0.27-1.03,0.71-1.39,1.24c-0.32,0.56-0.62,1.24-0.8,2.01c-0.21,0.8-0.27,1.51-0.21,2.13c0.06,0.83,0.38,1.48,0.92,1.92
|
||||
c0.56,0.44,1.3,0.68,2.25,0.68c0.3,0,0.59-0.03,0.86-0.06c0.65-0.09,1.21-0.3,1.68-0.62c0.68-0.44,1.12-1.06,1.33-1.86h-1.74
|
||||
c-0.15,0.44-0.41,0.8-0.77,1.03c-0.15,0.09-0.32,0.18-0.5,0.24c-0.21,0.09-0.44,0.12-0.68,0.12c-0.56,0-0.97-0.15-1.3-0.41
|
||||
c-0.3-0.27-0.47-0.65-0.53-1.15c0-0.18,0-0.38,0.03-0.59C38.89,25.21,38.92,25,39.01,24.76z M40.13,21.9
|
||||
c0.33-0.35,0.74-0.53,1.21-0.59c0.09,0,0.21-0.03,0.3-0.03c0.53,0,0.95,0.15,1.27,0.38c0.3,0.24,0.47,0.56,0.5,1
|
||||
c0.03,0.12,0.03,0.24,0,0.38c0,0.15-0.03,0.35-0.06,0.62h-2.01h-2.07C39.42,22.87,39.72,22.28,40.13,21.9z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.8 KiB |